diff --git a/apps/editor/components/ui/action-menu/furnish-tools.tsx b/apps/editor/components/ui/action-menu/furnish-tools.tsx new file mode 100644 index 00000000..23486e8b --- /dev/null +++ b/apps/editor/components/ui/action-menu/furnish-tools.tsx @@ -0,0 +1,107 @@ +"use client"; + +import NextImage from "next/image"; +import { Button } from "@/components/ui/primitives/button"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/primitives/tooltip"; + +import { cn } from "@/lib/utils"; +import useEditor, { CatalogCategory } from "@/store/use-editor"; + +export type FurnishToolConfig = { + id: "item"; + iconSrc: string; + label: string; + catalogCategory: CatalogCategory; +}; + +// Furnish mode tools: furniture, appliances, decoration (painting is now a control mode) +export const furnishTools: FurnishToolConfig[] = [ + { + id: "item", + iconSrc: "/icons/couch.png", + label: "Furniture", + catalogCategory: "furniture", + }, + { + id: "item", + iconSrc: "/icons/appliance.png", + label: "Appliance", + catalogCategory: "appliance", + }, + { + id: "item", + iconSrc: "/icons/kitchen.png", + label: "Kitchen", + catalogCategory: "kitchen", + }, + { + id: "item", + iconSrc: "/icons/bathroom.png", + label: "Bathroom", + catalogCategory: "bathroom", + }, + { + id: "item", + iconSrc: "/icons/tree.png", + label: "Outdoor", + catalogCategory: "outdoor", + }, +]; + +export function FurnishTools() { + const mode = useEditor((state) => state.mode); + const activeTool = useEditor((state) => state.tool); + const setActiveTool = useEditor((state) => state.setTool); + const catalogCategory = useEditor((state) => state.catalogCategory); + const setCatalogCategory = useEditor((state) => state.setCatalogCategory); + + return ( +
+ {tool.label} + {isActive && " (Click to deselect)"} +
+