import { ComponentConfig } from "@reacteditor/core"; import { Star } from "lucide-react"; import { FeaturedProductView, type FeaturedProductProps } from "@/components/commerce/featured-product"; export function createFeaturedProductEditor(opts: { productField: any; }): ComponentConfig { return { label: "Featured product", icon: , category: "commerce", defaultProps: { product: null, tagline: "Featured", ctaLabel: "Add to bag", align: "left", tone: "default", }, fields: { product: { label: "Product", ...opts.productField }, tagline: { label: "Tagline", type: "text", contentEditable: true }, ctaLabel: { label: "CTA label", type: "text", contentEditable: true }, align: { label: "Image alignment", type: "radio", options: [ { label: "Image left", value: "left" }, { label: "Image right", value: "right" }, ], }, tone: { label: "Tone", type: "radio", options: [ { label: "Default", value: "default" }, { label: "Muted", value: "muted" }, ], }, }, render: (props) => , }; }