import { ComponentConfig } from "@reacteditor/core"; import { FolderOpen } from "lucide-react"; import { CollectionView, type CollectionProps } from "@/components/commerce/collection"; export function createCollectionEditor(opts: { collectionField: any; }): ComponentConfig { return { label: "Collection page", icon: , category: "commerce", defaultProps: { collection: null, showDescription: "no" }, fields: { collection: { label: "Collection", ...opts.collectionField }, showDescription: { label: "Description", type: "radio", options: [ { label: "Hide description", value: "no" }, { label: "Show description", value: "yes" }, ], }, }, render: (props) => , }; }