import { Save, X } from "lucide-react"; import { useResourceForm } from "../../hooks/use_resource_form.js"; import { useResource } from "../../providers/resource.js"; import { LayoutRenderer } from "../renderers/layout.js"; import { Button } from "../ui/button.js"; import { Island, IslandActions, IslandContent } from "../ui/island.js"; import { AnimatePresence } from "motion/react"; export const ResourceForm = ({ record, type, }: { type: "create" | "update"; record?: any; }) => { const { resource } = useResource(); const form = useResourceForm(record); return (