import { Link } from '@inertiajs/react'; import { route } from '@izzyjs/route/client'; import { ActionIcon, AppShell, Badge, Box, Burger, Group, Menu, Text, } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import { BsThreeDotsVertical } from 'react-icons/bs'; import { GoPencil } from 'react-icons/go'; import { IoIosAddCircleOutline } from 'react-icons/io'; import { IoTrashOutline } from 'react-icons/io5'; import { ShareCollection } from '~/components/share/share_collection'; import { appendCollectionId } from '~/lib/navigation'; import { useActiveCollection } from '~/stores/collection_store'; import { Visibility } from '~/types/app'; interface DashboardHeaderProps { navbar: { opened: boolean; toggle: () => void; }; aside: { opened: boolean; toggle: () => void; }; } export function DashboardHeader({ navbar, aside }: DashboardHeaderProps) { const { t } = useTranslation('common'); const { activeCollection } = useActiveCollection(); return ( {activeCollection?.name}{' '} {activeCollection?.visibility === Visibility.PUBLIC && ( {t('visibility.public')} )} {activeCollection?.description && ( {activeCollection.description} )} } color="blue" > {t('link.create')} } color="blue" > {t('collection.edit')} } color="red" > {t('collection.delete')} ); }