import { Schemas } from '@fluid-app/fluid'; export { ApiTypes, EventType, Schemas } from '@fluid-app/fluid'; /** * Cart widget props */ interface CartWidgetProps { /** * Whether to use brand colors */ useBrand?: boolean; /** * Primary color for the cart widget */ primaryColor?: string; /** * Secondary color for the cart widget */ secondaryColor?: string; /** * Placement of cart sheet */ placement?: "right" | "left"; /** * The position of the cart widget * @default "bottom-right" */ position?: "top_left" | "top_right" | "bottom_left" | "bottom_right"; /** * The size of the cart widget in pixels * @default 60 */ size?: number; /** * The horizontal margin from the edge of the screen in pixels * @default 40 */ xMargin?: number; /** * The vertical margin from the edge of the screen in pixels * @default 98 */ yMargin?: number; /** * The display name for the shop shown in the cart header * @default "Fluid" */ fluidShopDisplayName?: string; /** * Whether to hide the widget trigger button * Use this when you want to provide your own custom cart button but still use the cart sheet functionality * @default false */ hideWidget?: boolean; /** * Enable demo mode to prevent any SDK API calls * This allows testing the widget UI without making HTTP requests * @default false */ demoMode?: boolean; /** * Mock cart data to use when in demo mode * If not provided in demo mode, a default mock cart will be used */ demoCart?: Schemas["Cart"] | null; } /** * Banner position options */ type BannerPosition = "top" | "bottom" | "left" | "right" | "center"; /** * Banner appearance variants */ type BannerVariant = "default" | "outline" | "vibrant" | "minimal"; /** * Banner size options */ type BannerSize = "sm" | "md" | "lg" | "full"; /** * Banner props interface */ interface BannerWidgetProps { /** * Title text for the banner */ title: string; /** * Description or promotional text (optional) */ description?: string; /** * URL for the banner image */ imageUrl: string; /** * Alternative text for the image */ imageAlt: string; /** * Position of the banner * @default "center" */ position?: BannerPosition; /** * Visual style variant of the banner * @default "default" */ variant?: BannerVariant; /** * Size of the banner * @default "md" */ size?: BannerSize; /** * Banner click destination URL */ targetUrl: string; /** * Text for the call-to-action button * @default "Shop Now" */ buttonText?: string; /** * Whether to show a button or make the entire banner clickable * @default true */ showButton?: boolean; /** * Optional additional CSS classes */ className?: string; /** * Optional tracking ID for analytics */ trackingId?: string; /** * Optional aspect ratio for the banner * @default 16/9 */ aspectRatio?: number; /** * Optional onClick handler */ onClick?: () => void; /** * Whether to hide the banner widget * @default false */ hideWidget?: boolean; } /** * Lead Capture Widget Props */ interface LeadCaptureWidgetProps { /** * Whether to use brand colors */ useBrand?: boolean; /** * Primary color for the widget */ primaryColor?: string; /** * Secondary color for the widget */ secondaryColor?: string; /** * Title of the widget * @default "Have a question?" */ title?: string; /** * Description text * @default "We'd love to get in touch!" */ description?: string; /** * Text for the submit button * @default "Send Message" */ submitButtonText?: string; /** * Success message shown after form submission * @default "Thank you for your message! We'll get back to you soon." */ successMessage?: string; /** * Callback function when form is submitted */ onSubmit?: (formData: LeadCaptureFormData) => void; /** * Whether to show the widget * @default true */ show?: boolean; /** * The position of the widget trigger button * @default "bottom-right" */ triggerPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right"; /** * The size of the widget trigger button in pixels * @default 60 */ size?: number; /** * The z-index of the widget trigger button * @default 9999 */ zIndex?: number; /** * The horizontal margin from the edge of the screen in pixels * @default 40 */ xMargin?: number; /** * The vertical margin from the edge of the screen in pixels * @default 98 */ yMargin?: number; /** * Whether to hide the widget trigger button * Use this when you want to provide your own custom trigger button * @default false */ hideWidget?: boolean; /** * Avatar image URL */ avatarSrc?: string; /** * Logo URL for the footer */ logoSrc?: string; /** * Logo alt text */ logoAlt?: string; /** * Footer text * @default "Use is subject to terms" */ footerText?: string; /** * URL for the terms and conditions page * @default "https://fluid.app/terms-conditions" */ termsUrl?: string; /** * Shop display name for the consent text * @default "Fluid" */ fluidShopDisplayName?: string; /** * Preferred contact method for lead capture * @default "email" */ contactMethod?: "email" | "phone"; /** * Milliseconds to wait before showing the attract bubble * @default 1000 */ attractBubbleShowDelay?: number; /** * Milliseconds to wait before hiding the attract bubble * @default 20000 */ attractBubbleHideDelay?: number; } /** * Form data interface */ interface LeadCaptureFormData { name: string; email?: string; phone?: string; message: string; } /** * Re-export FluidConfig type */ interface FluidConfig { fluidShop: string; fluidCustomerId?: string; } /** * Fluid SDK interface */ interface FluidSDK { getLocalCart: () => unknown; getCart: () => Promise; updateCartItems: (items: unknown) => Promise; decrementCartItem: (id: unknown) => Promise; checkout: () => Promise; EventTypes: Record; } export type { BannerPosition, BannerSize, BannerVariant, BannerWidgetProps, CartWidgetProps, FluidConfig, FluidSDK, LeadCaptureFormData, LeadCaptureWidgetProps };