<template>
  <div class="docs">
    <ui-title>
      <h1>{{ t('docs.policy.title') }}</h1>
    </ui-title>
    <div class="docs__main">
      <div class="container">
        <div
            class="docs__main-wrapper"
            v-if="post.content && !pending"
        >
          <div class="content" v-html="post.content" />
        </div>
        <skeletons-docs v-else />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import {usePostBySlug} from "@composables/posts";
import {usePageTitle} from "@composables/utils";

const {t} = useI18n();

const { post, pending } = await usePostBySlug('privacy-policy');
const { setPageTitle } = usePageTitle();

setPageTitle(t('breadcrumbs.policy'));
</script>

<style lang="scss" scoped>
.docs {
  &__main {
    background-color: $main;
    padding-block: 50px 100px;

    &-wrapper {
      display: flex;
      flex-direction: column;
      gap: 50px;

      & .content {
        display: flex;
        flex-direction: column;
        gap: 30px;

        color: $primary_dark;
        font-size: 16px;
        font-weight: 500;
        letter-spacing: -0.5px;
      }
    }
  }
}

:deep(ul) {
  padding-left: 20px;
}
</style>