import * as Y from "yjs"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "~/components/ui/dialog"; import { Input } from "~/components/ui/input"; import { Button } from "~/components/ui/button"; import { ColorPicker } from "../form/color_picker"; import { Label } from "~/components/ui/label"; import { IconPicker } from "../form/icon_picker"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "~/components/ui/alert-dialog"; import { useCollection, useCollections } from "~/hooks/use-metadata"; import { type CollectionId, type CollectionProperty, deleteCollection } from "~/lib/metadata"; import Icon from "@mdi/react"; import { mdiPin, mdiPinOff, mdiPlus, mdiTrashCan } from "@mdi/js"; import { createCollectionProperty, deleteCollectionProperty } from "~/lib/property"; import { useEffect } from "react"; import { PropertyTypeCombobox } from "../form/property_type_combobox"; type CollectionSettingsDialogProps = { name?: string; collectionId: CollectionId; children: React.ReactNode; }; export function CollectionSettingsDialog(props: CollectionSettingsDialogProps) { return ( ); } function SettingsSection(props: { collectionId: CollectionId }) { const collection = useCollection(props.collectionId) if (!collection) { return null; } return (