<template>
    <nav dir="rtl" class="flex text-xs" aria-label="Breadcrumb">
        <ol class="inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse py-2">
            <li class="inline-flex items-center">
                <NuxtLink :to="useRuntimeConfig().public.router.Home"
                    class="inline-flex items-center font-medium text-zinc-700 hover:text-blue-600 dark:text-zinc-400 dark:hover:text-white">
                    <svg class="w-3 h-3 me-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
                        fill="currentColor" viewBox="0 0 20 20">
                        <path
                            d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z" />
                    </svg>
                    خانه
                </NuxtLink>
            </li>
            <li aria-current="page">
                <NuxtLink :to="useRuntimeConfig().public.router.Book + store.book.id" class="flex items-center">
                    <svg class="rtl:rotate-180 w-3 h-3 text-zinc-400 mx-1" aria-hidden="true"
                        xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                            d="m1 9 4-4-4-4" />
                    </svg>
                    <span class="ms-1 font-medium text-zinc-500 md:ms-2 dark:text-zinc-400">{{ store.book.get_title }}</span>
                </NuxtLink >
            </li>
            <li aria-current="page">
                <NuxtLink :to="useRuntimeConfig().public.router.Chapter + store.chapter.id" class="flex items-center">
                    <svg class="rtl:rotate-180 w-3 h-3 text-zinc-400 mx-1" aria-hidden="true"
                        xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                            d="m1 9 4-4-4-4" />
                    </svg>
                    <span class="ms-1 font-medium text-zinc-500 md:ms-2 dark:text-zinc-400">{{ store.chapter.get_title }}</span>
                </NuxtLink >
            </li>
        </ol>
    </nav>
</template>

<script setup>
import { useMaghaleStore } from '~/store'
const store = useMaghaleStore()
</script>