import { _ as _sfc_main$3 } from "./index-C9kUGn43.js";
import { e as useMaghaleStore, a as useNuxtApp, g as useRoute, _ as __nuxt_component_0, b as useRuntimeConfig, d as useSeoMeta } from "../server.mjs";
import { ref, reactive, mergeProps, unref, withCtx, createBlock, openBlock, createVNode, useSSRContext, toDisplayString, withAsyncContext } from "vue";
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrRenderStyle, ssrLooseEqual, ssrRenderList } from "vue/server-renderer";
import axios from "axios";
import { _ as _sfc_main$4 } from "./second-title-B9UcHZfY.js";
import { _ as _sfc_main$5, a as _sfc_main$6 } from "./tiles-BSfcgfjL.js";
import { _ as _sfc_main$7 } from "./tiles-Wv8aXLwm.js";
import { _ as __nuxt_component_4 } from "./footer-Cr83qpIL.js";
import "./FirstTitle-jarWvN-b.js";
import "ofetch";
import "#internal/nuxt/paths";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/hookable/dist/index.mjs";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/unctx/dist/index.mjs";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/h3/dist/index.mjs";
import "pinia";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/defu/dist/defu.mjs";
import "vue-router";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/radix3/dist/index.mjs";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/ufo/dist/index.mjs";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/klona/dist/index.mjs";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/destr/dist/index.mjs";
import "deep-pick-omit";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/cookie-es/dist/index.mjs";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/ohash/dist/index.mjs";
import "sweetalert2";
import "C:/Users/QU3/Documents/webapps/maghale/node_modules/@unhead/vue/dist/index.mjs";
import "./statistics-90Di9IHE.js";
import "./_plugin-vue_export-helper-1tPrXgE0.js";
const _sfc_main$2 = {
  __name: "details",
  __ssrInlineRender: true,
  setup(__props) {
    const store = useMaghaleStore();
    const { $toPersianNumbers } = useNuxtApp();
    const toPersianNumbers = $toPersianNumbers;
    const id = useRoute().params.id;
    const likeColor = ref("none");
    const dislikeColor = ref("none");
    const markColor = ref("none");
    const chapter = reactive({ data: {} });
    axios.defaults.headers.common["Authorization"] = store.token;
    async function getChapter() {
      let url = useRuntimeConfig().public.BaseUrl + "books/";
      store.isAuthenticated ? url = url + "get_chapter_by_user/" : url = url + "get_chapter/";
      await axios.get(url + id).then((r) => {
        chapter.data = r.data;
        if (store.isAuthenticated) {
          if (r.data.activity.liked_by_me) {
            likeColor.value = "white";
          } else if (r.data.activity.disliked_by_me) {
            dislikeColor.value = "white";
          }
          if (r.data.activity.marked_by_me) {
            markColor.value = "white";
          }
        }
      });
    }
    getChapter();
    return (_ctx, _push, _parent, _attrs) => {
      const _component_Activity = _sfc_main$3;
      const _component_NuxtLink = __nuxt_component_0;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "shadow-2xl" }, _attrs))}>`);
      _push(ssrRenderComponent(_component_Activity, null, null, _parent));
      if (unref(chapter).data.activity) {
        _push(`<div><p class="mt-4 text-xs text-left font-normal text-zinc-500 dark:text-zinc-400">${ssrInterpolate(unref(toPersianNumbers)(unref(chapter).data.activity.persian_date))}</p><div dir="ltr" class="flex justify-between"><div dir="ltr" class="flex space-x-2 mt-6 text-xs leading-none tracking-tight text-zinc-950 dark:text-white"><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"><path stroke-linecap="round" stroke-linejoin="round" d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 0 1-2.555-.337A5.972 5.972 0 0 1 5.41 20.97a5.969 5.969 0 0 1-.474-.065 4.48 4.48 0 0 0 .978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25Z"></path></svg><p class="ml-1">${ssrInterpolate(unref(toPersianNumbers)(unref(chapter).data.activity.comment_count))}</p></div><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg><p class="ml-1">${ssrInterpolate(unref(toPersianNumbers)(unref(chapter).data.activity.seen_count))}</p></div><button${ssrIncludeBooleanAttr(unref(chapter).data.activity.liked_by_me) ? " disabled" : ""} class="flex items-center sm:ml-1"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"${ssrRenderAttr("fill", unref(likeColor))} class="size-4"><path stroke-linecap="round" stroke-linejoin="round" d="M6.633 10.25c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 0 1 2.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 0 0 .322-1.672V2.75a.75.75 0 0 1 .75-.75 2.25 2.25 0 0 1 2.25 2.25c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282m0 0h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 0 1-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 0 0-1.423-.23H5.904m10.598-9.75H14.25M5.904 18.5c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 0 1-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 9.953 4.167 9.5 5 9.5h1.053c.472 0 .745.556.5.96a8.958 8.958 0 0 0-1.302 4.665c0 1.194.232 2.333.654 3.375Z"></path></svg><p class="ml-1">${ssrInterpolate(unref(toPersianNumbers)(unref(chapter).data.activity.likes_count))}</p></button><button${ssrIncludeBooleanAttr(unref(chapter).data.activity.disliked_by_me) ? " disabled" : ""} class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"${ssrRenderAttr("fill", unref(dislikeColor))} class="size-4"><path stroke-linecap="round" stroke-linejoin="round" d="M7.498 15.25H4.372c-1.026 0-1.945-.694-2.054-1.715a12.137 12.137 0 0 1-.068-1.285c0-2.848.992-5.464 2.649-7.521C5.287 4.247 5.886 4 6.504 4h4.016a4.5 4.5 0 0 1 1.423.23l3.114 1.04a4.5 4.5 0 0 0 1.423.23h1.294M7.498 15.25c.618 0 .991.724.725 1.282A7.471 7.471 0 0 0 7.5 19.75 2.25 2.25 0 0 0 9.75 22a.75.75 0 0 0 .75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 0 0 2.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384m-10.253 1.5H9.7m8.075-9.75c.01.05.027.1.05.148.593 1.2.925 2.55.925 3.977 0 1.487-.36 2.89-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398-.306.774-1.086 1.227-1.918 1.227h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 0 0 .303-.54"></path></svg><p class="ml-1">${ssrInterpolate(unref(toPersianNumbers)(unref(chapter).data.activity.dislikes_count))}</p></button><button class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"${ssrRenderAttr("fill", unref(markColor))} class="size-4"><path stroke-linecap="round" stroke-linejoin="round" d="M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z"></path></svg></button><div class="items-center">`);
        _push(ssrRenderComponent(_component_NuxtLink, {
          to: ("useRuntimeConfig" in _ctx ? _ctx.useRuntimeConfig : unref(useRuntimeConfig))().public.router.ChapterEdit + unref(id),
          class: ""
        }, {
          default: withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 text-xl font-bold text-zinc-950 dark:text-white"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"${_scopeId}></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"${_scopeId}></path></svg>`);
            } else {
              return [
                (openBlock(), createBlock("svg", {
                  xmlns: "http://www.w3.org/2000/svg",
                  fill: "none",
                  viewBox: "0 0 24 24",
                  "stroke-width": "1.5",
                  stroke: "currentColor",
                  class: "size-5 text-xl font-bold text-zinc-950 dark:text-white"
                }, [
                  createVNode("path", {
                    "stroke-linecap": "round",
                    "stroke-linejoin": "round",
                    d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"
                  }),
                  createVNode("path", {
                    "stroke-linecap": "round",
                    "stroke-linejoin": "round",
                    d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
                  })
                ]))
              ];
            }
          }),
          _: 1
        }, _parent));
        _push(`</div></div></div></div>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div>`);
    };
  }
};
const _sfc_setup$2 = _sfc_main$2.setup;
_sfc_main$2.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/chapter/details.vue");
  return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
};
const _sfc_main$1 = {
  __name: "sections",
  __ssrInlineRender: true,
  setup(__props) {
    const { $toPersianNumbers } = useNuxtApp();
    const toPersianNumbers = $toPersianNumbers;
    const store = useMaghaleStore();
    const id = useRoute().params.id;
    const page = ref(1);
    const pages = ref(5);
    const search = ref("");
    const ordering = ref("activity__create_time");
    const sections = reactive({ data: {} });
    async function getSections() {
      await axios.get(`${useRuntimeConfig().public.BaseUrl}books/chapter_sections/?pk=${id}&page=${page.value}&ordering=${ordering.value}&search=${search.value}`).then((r) => {
        sections.data = r.data;
        pages.value = Math.floor((r.data.count - 1) / 10) + 1;
      });
    }
    getSections();
    return (_ctx, _push, _parent, _attrs) => {
      const _component_MaghaleSecondTitle = _sfc_main$4;
      const _component_NuxtLink = __nuxt_component_0;
      _push(`<div${ssrRenderAttrs(mergeProps({
        dir: "rtl",
        class: "shadow-2xl mt-4"
      }, _attrs))}><div class="flex justify-between items-center px-1">`);
      _push(ssrRenderComponent(_component_MaghaleSecondTitle, { title: "بخش‌ها" }, null, _parent));
      _push(ssrRenderComponent(_component_NuxtLink, {
        to: ("useRuntimeConfig" in _ctx ? _ctx.useRuntimeConfig : unref(useRuntimeConfig))().public.router.SectionAdd
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 text-zinc-950 dark:text-white"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"${_scopeId}></path></svg>`);
          } else {
            return [
              (openBlock(), createBlock("svg", {
                xmlns: "http://www.w3.org/2000/svg",
                fill: "none",
                viewBox: "0 0 24 24",
                "stroke-width": "1.5",
                stroke: "currentColor",
                class: "size-5 text-zinc-950 dark:text-white"
              }, [
                createVNode("path", {
                  "stroke-linecap": "round",
                  "stroke-linejoin": "round",
                  d: "M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"
                })
              ]))
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`</div><div class="dark:bg-zinc-950 rounded-lg p-2 mt-2"><div class="relative overflow-x-auto shadow-md"><div class="flex items-center justify-start pb-4"><div><button id="dropdownRadioButton" data-dropdown-toggle="dropdownRadio" class="inline-flex items-center text-zinc-500 ml-2 bg-white border border-zinc-300 focus:outline-none hover:bg-zinc-100 focus:ring-4 focus:ring-zinc-100 font-medium rounded-lg px-3 py-1.5 dark:bg-zinc-900 dark:text-white dark:border-zinc-600 dark:hover:bg-zinc-800 dark:hover:border-zinc-600 dark:focus:ring-zinc-800" type="button"><svg class="w-3 h-3 text-zinc-500 dark:text-zinc-400 me-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm3.982 13.982a1 1 0 0 1-1.414 0l-3.274-3.274A1.012 1.012 0 0 1 9 10V6a1 1 0 0 1 2 0v3.586l2.982 2.982a1 1 0 0 1 0 1.414Z"></path></svg> مرتب‌سازی <svg class="w-2.5 h-2.5 ms-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"></path></svg></button><div id="dropdownRadio" class="z-10 hidden w-48 bg-white divide-y divide-zinc-100 rounded-lg shadow dark:bg-zinc-800 dark:divide-zinc-600" data-popper-reference-hidden="" data-popper-escaped="" data-popper-placement="top" style="${ssrRenderStyle({ "position": "absolute", "inset": "auto auto 0px 0px", "margin": "0px", "transform": "translate3d(522.5px, 3847.5px, 0px)" })}"><ul class="p-3 space-y-1 text-zinc-800 dark:text-zinc-200" aria-labelledby="dropdownRadioButton"><li><div class="flex items-center p-2 rounded hover:bg-zinc-100 dark:hover:bg-zinc-600"><input id="filter-radio-example-1" type="radio" value="activity__title" name="filter-radio"${ssrIncludeBooleanAttr(ssrLooseEqual(unref(ordering), "activity__title")) ? " checked" : ""} class="w-4 h-4 text-blue-600 bg-zinc-100 border-zinc-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-zinc-900 dark:focus:ring-offset-zinc-900 focus:ring-2 dark:bg-zinc-800 dark:border-zinc-600"><label for="filter-radio-example-1" class="w-full ms-2 font-medium text-zinc-950 rounded dark:text-zinc-300">عنوان</label></div></li><li><div class="flex items-center p-2 rounded hover:bg-zinc-100 dark:hover:bg-zinc-600"><input id="filter-radio-example-2" type="radio" value="activity__create_time"${ssrIncludeBooleanAttr(ssrLooseEqual(unref(ordering), "activity__create_time")) ? " checked" : ""} name="filter-radio" class="w-4 h-4 text-blue-600 bg-zinc-100 border-zinc-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-zinc-900 dark:focus:ring-offset-zinc-900 focus:ring-2 dark:bg-zinc-800 dark:border-zinc-600"><label for="filter-radio-example-2" class="w-full ms-2 font-medium text-zinc-950 rounded dark:text-zinc-300">تاریخ ثبت</label></div></li></ul></div></div><label for="table-search" class="sr-only">Search</label><div class="relative"><div class="absolute inset-y-0 left-0 rtl:inset-r-0 rtl:right-0 flex items-center ps-3 pointer-events-none"><svg class="w-5 h-5 text-zinc-500 dark:text-zinc-400" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd"></path></svg></div><input type="text" id="table-search"${ssrRenderAttr("value", unref(search))} class="block text-xs p-1 ps-10 text-zinc-950 border border-zinc-300 rounded-lg bg-zinc-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-800 dark:border-zinc-600 dark:placeholder-zinc-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="جستجو در فصل‌ها"></div></div><table class="w-full text-right text-zinc-500 dark:text-zinc-400"><thead class="text-xs text-zinc-800 uppercase bg-zinc-50 dark:bg-zinc-800 dark:text-zinc-400"><tr class=""><th scope="col" class="p-2"> عنوان </th><th scope="col" class="py-1 px-2 w-4"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg></th><th scope="col" class="p-1 w-4 flex-row text-center"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"></path></svg></th><th scope="col" class="p-1 w-4 flex-row"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 mx-auto"><path stroke-linecap="round" stroke-linejoin="round" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"></path></svg></th></tr></thead><tbody><!--[-->`);
      ssrRenderList(unref(sections).data.results, (instance) => {
        _push(`<tr class="bg-white border-b dark:bg-zinc-900 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-600"><th scope="row" class="px-2 py-2 font-medium text-zinc-950 whitespace-nowrap dark:text-white">`);
        _push(ssrRenderComponent(_component_NuxtLink, {
          to: ("useRuntimeConfig" in _ctx ? _ctx.useRuntimeConfig : unref(useRuntimeConfig))().public.router.Section + instance.id
        }, {
          default: withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(`<span${_scopeId}>${ssrInterpolate(instance.get_title)}</span>`);
            } else {
              return [
                createVNode("span", {
                  onClick: ($event) => unref(store).setSection(instance)
                }, toDisplayString(instance.get_title), 9, ["onClick"])
              ];
            }
          }),
          _: 2
        }, _parent));
        _push(`</th><th scope="row" class="p-1 py-2 flex-row text-center">`);
        _push(ssrRenderComponent(_component_NuxtLink, {
          to: ("useRuntimeConfig" in _ctx ? _ctx.useRuntimeConfig : unref(useRuntimeConfig))().public.router.User + instance.activity.user.id
        }, {
          default: withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(`<img class="size-6 rounded-full"${ssrRenderAttr("src", ("useRuntimeConfig" in _ctx ? _ctx.useRuntimeConfig : unref(useRuntimeConfig))().public.MediaUrl + instance.activity.user.get_image)} alt=""${_scopeId}>`);
            } else {
              return [
                createVNode("img", {
                  class: "size-6 rounded-full",
                  src: ("useRuntimeConfig" in _ctx ? _ctx.useRuntimeConfig : unref(useRuntimeConfig))().public.MediaUrl + instance.activity.user.get_image,
                  alt: ""
                }, null, 8, ["src"])
              ];
            }
          }),
          _: 2
        }, _parent));
        _push(`</th><th scope="row" class="p-1 py-2 font-medium text-zinc-950 whitespace-nowrap dark:text-white flex-row text-center">${ssrInterpolate(unref(toPersianNumbers)(instance.activity.user_count))}</th><th scope="row" class="p-1 py-2 font-medium text-zinc-950 whitespace-nowrap dark:text-white flex-row text-center">${ssrInterpolate(unref(toPersianNumbers)(instance.sections_count))}</th></tr>`);
      });
      _push(`<!--]--></tbody></table></div><nav class="flex items-center flex-column flex-wrap md:flex-row justify-between pt-4" aria-label="Table navigation"><span class="font-normal text-zinc-500 dark:text-zinc-400 mb-4 md:mb-0 block w-full md:inline md:w-auto">مشاهده <span class="font-semibold text-zinc-950 dark:text-white">${ssrInterpolate(unref(toPersianNumbers)(unref(page) * 10))} - ${ssrInterpolate(unref(toPersianNumbers)((unref(page) - 1) * 10 + 1))}</span> از <span class="font-semibold text-zinc-950 dark:text-white">${ssrInterpolate(unref(toPersianNumbers)(unref(sections).data.count))}</span></span><ul class="inline-flex -space-x-px rtl:space-x-reverse h-8"><li><button${ssrIncludeBooleanAttr(!unref(sections).data.previous) ? " disabled" : ""} class="flex items-center justify-center px-3 h-8 ms-0 leading-tight text-zinc-500 bg-white border border-zinc-300 rounded-s-lg hover:bg-zinc-100 hover:text-zinc-800 dark:bg-zinc-900 dark:border-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-white">قبلی</button></li><!--[-->`);
      ssrRenderList(unref(pages), (i) => {
        _push(`<li>`);
        if (unref(page) != i) {
          _push(`<button class="flex items-center justify-center px-3 h-8 leading-tight text-zinc-500 bg-white border border-zinc-300 hover:bg-zinc-100 hover:text-zinc-800 dark:bg-zinc-900 dark:border-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-white">${ssrInterpolate(unref(toPersianNumbers)(i))}</button>`);
        } else {
          _push(`<button aria-current="page" class="flex items-center justify-center px-3 h-8 text-blue-600 border border-zinc-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-800 dark:border-zinc-800 dark:bg-zinc-800 dark:text-white">${ssrInterpolate(unref(toPersianNumbers)(i))}</button>`);
        }
        _push(`</li>`);
      });
      _push(`<!--]--><li><button${ssrIncludeBooleanAttr(!unref(sections).data.next) ? " disabled" : ""} class="flex items-center justify-center px-3 h-8 leading-tight text-zinc-500 bg-white border border-zinc-300 rounded-e-lg hover:bg-zinc-100 hover:text-zinc-800 dark:bg-zinc-900 dark:border-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-white">بعدی</button></li></ul></nav></div></div>`);
    };
  }
};
const _sfc_setup$1 = _sfc_main$1.setup;
_sfc_main$1.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/chapter/sections.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const _sfc_main = {
  __name: "index",
  __ssrInlineRender: true,
  async setup(__props) {
    let __temp, __restore;
    const store = useMaghaleStore();
    const activity = ([__temp, __restore] = withAsyncContext(() => $fetch(useRuntimeConfig().public.BaseUrl + "books/get_chapter_activity/" + useRoute().params.id)), __temp = await __temp, __restore(), __temp);
    useSeoMeta({
      title: activity.title,
      ogTitle: activity.title,
      image: activity.get_image,
      ogImage: activity.get_image,
      ogImageUrl: activity.get_image,
      description: activity.abstract,
      ogDescription: activity.abstract
    });
    store.setActivityTitle(activity);
    return (_ctx, _push, _parent, _attrs) => {
      const _component_ChapterDetails = _sfc_main$2;
      const _component_ChapterSections = _sfc_main$1;
      const _component_HandoutTiles = _sfc_main$5;
      const _component_LinkTiles = _sfc_main$6;
      const _component_CommentTiles = _sfc_main$7;
      const _component_MaghaleFooter = __nuxt_component_4;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "p-2" }, _attrs))}>`);
      _push(ssrRenderComponent(_component_ChapterDetails, null, null, _parent));
      _push(ssrRenderComponent(_component_ChapterSections, null, null, _parent));
      _push(ssrRenderComponent(_component_HandoutTiles, null, null, _parent));
      _push(ssrRenderComponent(_component_LinkTiles, null, null, _parent));
      _push(ssrRenderComponent(_component_CommentTiles, null, null, _parent));
      _push(ssrRenderComponent(_component_MaghaleFooter, null, null, _parent));
      _push(`</div>`);
    };
  }
};
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/chapters/[id]/index.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export {
  _sfc_main as default
};
//# sourceMappingURL=index-DlHCf5SY.js.map
