{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "brand-assets-menu",
  "title": "Brand Assets Menu",
  "author": "ncdai <dai@chanhdai.com>",
  "description": "Context menu for copying brand SVGs and opening asset links.",
  "dependencies": [
    "@rexa-developer/tiks",
    "lucide-react"
  ],
  "registryDependencies": [
    "context-menu",
    "toast"
  ],
  "files": [
    {
      "path": "src/registry/components/brand-assets-menu/brand-assets-menu.tsx",
      "content": "\"use client\"\n\nimport { useTiks } from \"@rexa-developer/tiks/react\"\nimport { DownloadIcon, SquareDashedIcon, TypeIcon } from \"lucide-react\"\n\nimport {\n  ContextMenu,\n  ContextMenuContent,\n  ContextMenuItem,\n  ContextMenuSeparator,\n  ContextMenuTrigger,\n} from \"@/components/ui/context-menu\"\nimport { toast } from \"@/components/ui/toast\"\n\nexport type BrandAssetsMenuProps = {\n  logomark: React.ReactElement\n  logomarkSVG: string\n  logotypeSVG: string\n  brandGuidelinesURL: string\n  brandAssetsURL: string\n  children: React.ReactElement\n}\n\nexport function BrandAssetsMenu({\n  logomark,\n  logomarkSVG,\n  logotypeSVG,\n  brandGuidelinesURL,\n  brandAssetsURL,\n  children,\n}: BrandAssetsMenuProps) {\n  const { success } = useTiks()\n\n  return (\n    <ContextMenu>\n      <ContextMenuTrigger render={children} />\n\n      <ContextMenuContent className=\"w-fit\">\n        <ContextMenuItem\n          onClick={() => {\n            copyText(logomarkSVG)\n            toast.add({ type: \"success\", title: \"Logomark as SVG copied\" })\n            success()\n          }}\n        >\n          {logomark}\n          Copy Logomark as SVG\n        </ContextMenuItem>\n\n        <ContextMenuItem\n          onClick={() => {\n            copyText(logotypeSVG)\n            toast.add({ type: \"success\", title: \"Logotype as SVG copied\" })\n            success()\n          }}\n        >\n          <TypeIcon />\n          Copy Logotype as SVG\n        </ContextMenuItem>\n\n        <ContextMenuSeparator />\n\n        <ContextMenuItem\n          render={\n            <a\n              href={brandGuidelinesURL}\n              target=\"_blank\"\n              rel=\"noopener noreferrer\"\n            />\n          }\n        >\n          <SquareDashedIcon />\n          Brand Guidelines\n        </ContextMenuItem>\n\n        <ContextMenuItem\n          render={\n            <a\n              href={brandAssetsURL}\n              target=\"_blank\"\n              rel=\"noopener noreferrer\"\n              download\n            />\n          }\n        >\n          <DownloadIcon />\n          Download Brand Assets\n        </ContextMenuItem>\n      </ContextMenuContent>\n    </ContextMenu>\n  )\n}\n\nconst copyText = async (text: string) => {\n  try {\n    await navigator.clipboard.writeText(text)\n    return true\n  } catch {\n    return false\n  }\n}\n",
      "type": "registry:component",
      "target": "@components/brand-assets-menu.tsx"
    }
  ],
  "docs": "https://chanhdai.com/components/brand-assets-menu",
  "categories": [
    "menus"
  ],
  "type": "registry:component"
}