"use client";
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import * as React from 'react';
import React__default, { useMemo } from 'react';
import { cva } from 'class-variance-authority';
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
import { Img } from '@page-speed/img';
import { Icon } from '@page-speed/icon';
import { usePlatformFromUrl } from '@opensite/hooks/usePlatformFromUrl';

// lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function normalizePhoneNumber(input) {
  const trimmed = input.trim();
  if (trimmed.toLowerCase().startsWith("tel:")) {
    return trimmed;
  }
  const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
  if (match) {
    const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
    const extension = match[3];
    const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
    const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
    return `tel:${withExtension}`;
  }
  const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
  return `tel:${cleaned}`;
}
function normalizeEmail(input) {
  const trimmed = input.trim();
  if (trimmed.toLowerCase().startsWith("mailto:")) {
    return trimmed;
  }
  return `mailto:${trimmed}`;
}
function isEmail(input) {
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  return emailRegex.test(input.trim());
}
function isPhoneNumber(input) {
  const trimmed = input.trim();
  if (trimmed.toLowerCase().startsWith("tel:")) {
    return true;
  }
  const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
  return phoneRegex.test(trimmed);
}
function isInternalUrl(href) {
  if (typeof window === "undefined") {
    return href.startsWith("/") && !href.startsWith("//");
  }
  const trimmed = href.trim();
  if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
    return true;
  }
  try {
    const url = new URL(trimmed, window.location.href);
    const currentOrigin = window.location.origin;
    const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
    return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
  } catch {
    return false;
  }
}
function toRelativePath(href) {
  if (typeof window === "undefined") {
    return href;
  }
  const trimmed = href.trim();
  if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
    return trimmed;
  }
  try {
    const url = new URL(trimmed, window.location.href);
    const currentOrigin = window.location.origin;
    const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
    if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
      return url.pathname + url.search + url.hash;
    }
  } catch {
  }
  return trimmed;
}
function useNavigation({
  href,
  onClick
} = {}) {
  const linkType = React.useMemo(() => {
    if (!href || href.trim() === "") {
      return onClick ? "none" : "none";
    }
    const trimmed = href.trim();
    if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
      return "mailto";
    }
    if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
      return "tel";
    }
    if (isInternalUrl(trimmed)) {
      return "internal";
    }
    try {
      new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
      return "external";
    } catch {
      return "internal";
    }
  }, [href, onClick]);
  const normalizedHref = React.useMemo(() => {
    if (!href || href.trim() === "") {
      return void 0;
    }
    const trimmed = href.trim();
    switch (linkType) {
      case "tel":
        return normalizePhoneNumber(trimmed);
      case "mailto":
        return normalizeEmail(trimmed);
      case "internal":
        return toRelativePath(trimmed);
      case "external":
        return trimmed;
      default:
        return trimmed;
    }
  }, [href, linkType]);
  const target = React.useMemo(() => {
    switch (linkType) {
      case "external":
        return "_blank";
      case "internal":
        return "_self";
      case "mailto":
      case "tel":
        return void 0;
      default:
        return void 0;
    }
  }, [linkType]);
  const rel = React.useMemo(() => {
    if (linkType === "external") {
      return "noopener noreferrer";
    }
    return void 0;
  }, [linkType]);
  const isExternal = linkType === "external";
  const isInternal = linkType === "internal";
  const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
  const handleClick = React.useCallback(
    (event) => {
      if (onClick) {
        try {
          onClick(event);
        } catch (error) {
          console.error("Error in user onClick handler:", error);
        }
      }
      if (event.defaultPrevented) {
        return;
      }
      if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
      !event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
        if (typeof window !== "undefined") {
          const handler = window.__opensiteNavigationHandler;
          if (typeof handler === "function") {
            try {
              const handled = handler(normalizedHref, event.nativeEvent || event);
              if (handled !== false) {
                event.preventDefault();
              }
            } catch (error) {
              console.error("Error in navigation handler:", error);
            }
          }
        }
      }
    },
    [onClick, shouldUseRouter, normalizedHref]
  );
  return {
    linkType,
    normalizedHref,
    target,
    rel,
    isExternal,
    isInternal,
    shouldUseRouter,
    handleClick
  };
}
var baseStyles = [
  // Layout
  "inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
  // Typography - using CSS variables with sensible defaults
  "font-[var(--button-font-family,inherit)]",
  "font-[var(--button-font-weight,500)]",
  "tracking-[var(--button-letter-spacing,0)]",
  "leading-[var(--button-line-height,1.25)]",
  "[text-transform:var(--button-text-transform,none)]",
  "text-sm",
  // Border radius
  "rounded-[var(--button-radius,var(--radius,0.375rem))]",
  // Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
  "[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
  // Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
  "[box-shadow:var(--button-shadow,none)]",
  "hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
  // Disabled state
  "disabled:pointer-events-none disabled:opacity-50",
  // SVG handling
  "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
  // Focus styles
  "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
  // Invalid state
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
].join(" ");
var buttonVariants = cva(baseStyles, {
  variants: {
    variant: {
      // Default (Primary) variant - full customization
      default: [
        "bg-[var(--button-default-bg,hsl(var(--primary)))]",
        "text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
        "border-[length:var(--button-default-border-width,0px)]",
        "border-[color:var(--button-default-border,transparent)]",
        "[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
        "hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
        "hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
        "hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
        "hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
      ].join(" "),
      // Destructive variant - full customization
      destructive: [
        "bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
        "text-[var(--button-destructive-fg,white)]",
        "border-[length:var(--button-destructive-border-width,0px)]",
        "border-[color:var(--button-destructive-border,transparent)]",
        "[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
        "hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
        "hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
        "hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
        "hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
        "focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
        "dark:bg-destructive/60"
      ].join(" "),
      // Outline variant - full customization with proper border handling
      outline: [
        "bg-[var(--button-outline-bg,hsl(var(--background)))]",
        "text-[var(--button-outline-fg,inherit)]",
        "border-[length:var(--button-outline-border-width,1px)]",
        "border-[color:var(--button-outline-border,hsl(var(--border)))]",
        "[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
        "hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
        "hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
        "hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
        "hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
        "dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
      ].join(" "),
      // Secondary variant - full customization
      secondary: [
        "bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
        "text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
        "border-[length:var(--button-secondary-border-width,0px)]",
        "border-[color:var(--button-secondary-border,transparent)]",
        "[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
        "hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
        "hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
        "hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
        "hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
      ].join(" "),
      // Ghost variant - full customization
      ghost: [
        "bg-[var(--button-ghost-bg,transparent)]",
        "text-[var(--button-ghost-fg,inherit)]",
        "border-[length:var(--button-ghost-border-width,0px)]",
        "border-[color:var(--button-ghost-border,transparent)]",
        "[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
        "hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
        "hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
        "hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
        "hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
        "dark:hover:bg-accent/50"
      ].join(" "),
      // Link variant - full customization
      link: [
        "bg-[var(--button-link-bg,transparent)]",
        "text-[var(--button-link-fg,hsl(var(--primary)))]",
        "border-[length:var(--button-link-border-width,0px)]",
        "border-[color:var(--button-link-border,transparent)]",
        "[box-shadow:var(--button-link-shadow,none)]",
        "hover:bg-[var(--button-link-hover-bg,transparent)]",
        "hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
        "hover:[box-shadow:var(--button-link-shadow-hover,none)]",
        "underline-offset-4 hover:underline"
      ].join(" ")
    },
    size: {
      default: [
        "h-[var(--button-height-md,2.25rem)]",
        "px-[var(--button-padding-x-md,1rem)]",
        "py-[var(--button-padding-y-md,0.5rem)]",
        "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
      ].join(" "),
      sm: [
        "h-[var(--button-height-sm,2rem)]",
        "px-[var(--button-padding-x-sm,0.75rem)]",
        "py-[var(--button-padding-y-sm,0.25rem)]",
        "gap-1.5",
        "has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
      ].join(" "),
      md: [
        "h-[var(--button-height-md,2.25rem)]",
        "px-[var(--button-padding-x-md,1rem)]",
        "py-[var(--button-padding-y-md,0.5rem)]",
        "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
      ].join(" "),
      lg: [
        "h-[var(--button-height-lg,2.5rem)]",
        "px-[var(--button-padding-x-lg,1.5rem)]",
        "py-[var(--button-padding-y-lg,0.5rem)]",
        "has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
      ].join(" "),
      icon: "size-[var(--button-height-md,2.25rem)]",
      "icon-sm": "size-[var(--button-height-sm,2rem)]",
      "icon-lg": "size-[var(--button-height-lg,2.5rem)]"
    }
  },
  defaultVariants: {
    variant: "default",
    size: "default"
  }
});
var Pressable = React.forwardRef(
  ({
    children,
    className,
    href,
    onClick,
    variant,
    size,
    asButton = false,
    fallbackComponentType = "span",
    componentType,
    "aria-label": ariaLabel,
    "aria-describedby": ariaDescribedby,
    id,
    ...props
  }, ref) => {
    const navigation = useNavigation({ href, onClick });
    const {
      normalizedHref,
      target,
      rel,
      linkType,
      isInternal,
      handleClick
    } = navigation;
    const shouldRenderLink = normalizedHref && linkType !== "none";
    const shouldRenderButton = !shouldRenderLink && onClick;
    const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
    const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
    const shouldApplyButtonStyles = asButton || variant || size;
    const combinedClassName = cn(
      shouldApplyButtonStyles && buttonVariants({ variant, size }),
      className
    );
    const dataProps = Object.fromEntries(
      Object.entries(props).filter(([key]) => key.startsWith("data-"))
    );
    const buttonDataAttributes = shouldApplyButtonStyles ? {
      "data-slot": "button",
      "data-variant": variant ?? "default",
      "data-size": size ?? "default"
    } : {};
    const commonProps = {
      className: combinedClassName,
      onClick: handleClick,
      "aria-label": ariaLabel,
      "aria-describedby": ariaDescribedby,
      id,
      ...dataProps,
      ...buttonDataAttributes
    };
    if (finalComponentType === "a" && shouldRenderLink) {
      return /* @__PURE__ */ jsx(
        "a",
        {
          ref,
          href: normalizedHref,
          target,
          rel,
          ...commonProps,
          ...props,
          children
        }
      );
    }
    if (finalComponentType === "button") {
      return /* @__PURE__ */ jsx(
        "button",
        {
          ref,
          type: props.type || "button",
          ...commonProps,
          ...props,
          children
        }
      );
    }
    if (finalComponentType === "div") {
      return /* @__PURE__ */ jsx(
        "div",
        {
          ref,
          ...commonProps,
          children
        }
      );
    }
    return /* @__PURE__ */ jsx(
      "span",
      {
        ref,
        ...commonProps,
        children
      }
    );
  }
);
Pressable.displayName = "Pressable";
function isThemedLogo(logo) {
  return "light" in logo || "dark" in logo;
}
var FooterLogo = ({
  logo,
  logoSlot,
  logoClassName,
  logoImageClassName,
  logoTitleClassName,
  optixFlowConfig
}) => {
  if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
  if (!logo) return null;
  const hasThemedSources = isThemedLogo(logo) && (logo.light || logo.dark);
  const hasStandardSource = !isThemedLogo(logo) && logo.src;
  const logoContent = hasThemedSources ? (
    // Themed logo with light/dark mode sources
    /* @__PURE__ */ jsxs(Fragment, { children: [
      logo.light && /* @__PURE__ */ jsx(
        Img,
        {
          src: logo.light,
          alt: logo.alt || "Logo",
          className: cn(
            "h-8 w-auto object-contain dark:hidden md:h-10",
            logoImageClassName
          ),
          optixFlowConfig
        }
      ),
      logo.dark && /* @__PURE__ */ jsx(
        Img,
        {
          src: logo.dark,
          alt: logo.alt || "Logo",
          className: cn(
            "hidden h-8 w-auto object-contain dark:block md:h-10",
            logoImageClassName
          ),
          optixFlowConfig
        }
      )
    ] })
  ) : hasStandardSource ? (
    // Standard single logo image
    /* @__PURE__ */ jsx(
      Img,
      {
        src: logo.src,
        alt: logo.alt || "Logo",
        className: cn("h-8 w-auto object-contain md:h-10", logoImageClassName),
        optixFlowConfig
      }
    )
  ) : logo.title ? (
    // Text-based logo fallback
    /* @__PURE__ */ jsx("span", { className: cn("text-lg font-semibold md:text-xl", logoTitleClassName), children: logo.title })
  ) : null;
  if (!logoContent) return null;
  if (logo.url) {
    return /* @__PURE__ */ jsx(
      Pressable,
      {
        href: logo.url,
        className: cn("inline-flex items-center", logoClassName),
        children: logoContent
      }
    );
  }
  return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center", logoClassName), children: logoContent });
};
function FooterCopyright({
  copyright,
  className
}) {
  const currentYear = useMemo(() => (/* @__PURE__ */ new Date()).getFullYear(), []);
  if (!copyright) {
    return null;
  }
  return /* @__PURE__ */ jsxs("p", { className: cn(className), children: [
    "\xA9 ",
    currentYear,
    " ",
    copyright,
    " All Rights Reserved."
  ] });
}
var brandAttributionOptions = [
  {
    brand: "open_site_ai",
    options: [
      {
        prefix: "Powered by ",
        anchorText: "AI Website Builder",
        href: "https://opensite.ai",
        suffix: ""
      },
      {
        prefix: "",
        anchorText: "AI-Powered Web Design",
        href: "https://opensite.ai",
        suffix: " by OpenSite"
      },
      {
        prefix: "Built with ",
        anchorText: "OpenSite AI",
        href: "https://opensite.ai"
      },
      {
        prefix: "Website by ",
        anchorText: "Intelligent Site Builder",
        href: "https://opensite.ai"
      },
      {
        prefix: "Designed using ",
        anchorText: "AI Website Platform",
        href: "https://opensite.ai"
      },
      {
        prefix: "",
        anchorText: "Automated Website Design",
        href: "https://opensite.ai",
        suffix: " \u2013 OpenSite"
      },
      {
        prefix: "Created with ",
        anchorText: "AI Digital Presence Solutions",
        href: "https://opensite.ai"
      },
      {
        prefix: "",
        anchorText: "Smart Website Builder",
        href: "https://opensite.ai",
        suffix: " by OpenSite AI"
      },
      {
        prefix: "Powered by ",
        anchorText: "Industry-Specific AI Web Platform",
        href: "https://opensite.ai"
      },
      {
        prefix: "",
        anchorText: "AI Site Generator",
        href: "https://opensite.ai",
        suffix: " \u2013 OpenSite"
      }
    ]
  },
  {
    brand: "dashtrack",
    options: [
      {
        prefix: "",
        anchorText: "Restaurant Website Builder",
        href: "https://dashtrack.com",
        suffix: " by DashTrack"
      },
      {
        prefix: "Powered by ",
        anchorText: "DashTrack",
        href: "https://dashtrack.com",
        suffix: " Restaurant Platform"
      },
      {
        prefix: "",
        anchorText: "Bar & Restaurant Marketing Platform",
        href: "https://dashtrack.com"
      },
      {
        prefix: "Menu & Website by ",
        anchorText: "Restaurant Digital Solutions",
        href: "https://dashtrack.com"
      },
      {
        prefix: "",
        anchorText: "Hospitality Website Design",
        href: "https://dashtrack.com",
        suffix: " \u2013 DashTrack"
      },
      {
        prefix: "Online Ordering by ",
        anchorText: "DashTrack Restaurant Technology",
        href: "https://dashtrack.com"
      },
      {
        prefix: "",
        anchorText: "Restaurant Review Management",
        href: "https://dashtrack.com",
        suffix: " Platform"
      },
      {
        prefix: "Built with ",
        anchorText: "AI-Powered Restaurant Website Builder",
        href: "https://dashtrack.com"
      },
      {
        prefix: "",
        anchorText: "Menu Automation & Restaurant SEO",
        href: "https://dashtrack.com"
      },
      {
        prefix: "Designed by ",
        anchorText: "DashTrack Hospitality Solutions",
        href: "https://dashtrack.com"
      }
    ]
  },
  {
    brand: "insurance_site_ai",
    options: [
      {
        prefix: "",
        anchorText: "Insurance Agency Website Design",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "InsuranceSite AI",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "",
        anchorText: "Insurance Agent Website Builder",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "Built with ",
        anchorText: "AI Insurance CRM Platform",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "",
        anchorText: "Insurance Agency Marketing Automation",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "Website by ",
        anchorText: "Insurance Digital Solutions",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "",
        anchorText: "Insurance Lead Generation Platform",
        href: "https://insurancesite.ai",
        suffix: " \u2013 InsuranceSite"
      },
      {
        prefix: "Designed with ",
        anchorText: "AI-Powered Insurance Website Builder",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "",
        anchorText: "Insurance Broker Web Platform",
        href: "https://insurancesite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "InsuranceSite Agency Solutions",
        href: "https://insurancesite.ai"
      }
    ]
  },
  {
    brand: "realtor_site_ai",
    options: [
      {
        prefix: "",
        anchorText: "Real Estate Agent Website Builder",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "RealtorSite AI",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "",
        anchorText: "Realtor Website with MLS Integration",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "Built with ",
        anchorText: "AI Real Estate Marketing Platform",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "",
        anchorText: "IDX Website Builder for Realtors",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "Website by ",
        anchorText: "Real Estate Digital Solutions",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "",
        anchorText: "Property Listing Website Platform",
        href: "https://realtorsite.ai",
        suffix: " \u2013 RealtorSite"
      },
      {
        prefix: "Designed with ",
        anchorText: "AI-Powered Realtor Website Builder",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "",
        anchorText: "Real Estate Lead Generation Platform",
        href: "https://realtorsite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "RealtorSite Agent Solutions",
        href: "https://realtorsite.ai"
      }
    ]
  },
  {
    brand: "ortho_site_ai",
    options: [
      {
        prefix: "",
        anchorText: "Orthodontist Website Design",
        href: "https://orthosite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "OrthoSite AI",
        href: "https://orthosite.ai"
      },
      {
        prefix: "",
        anchorText: "Orthodontic Practice Website Builder",
        href: "https://orthosite.ai"
      },
      {
        prefix: "Built with ",
        anchorText: "AI Orthodontic Marketing Platform",
        href: "https://orthosite.ai"
      },
      {
        prefix: "",
        anchorText: "Braces & Invisalign Practice Website",
        href: "https://orthosite.ai"
      },
      {
        prefix: "Website by ",
        anchorText: "Orthodontic Digital Solutions",
        href: "https://orthosite.ai"
      },
      {
        prefix: "",
        anchorText: "Orthodontist SEO & Patient Acquisition",
        href: "https://orthosite.ai",
        suffix: " \u2013 OrthoSite"
      },
      {
        prefix: "Designed with ",
        anchorText: "AI-Powered Orthodontic Website Builder",
        href: "https://orthosite.ai"
      },
      {
        prefix: "",
        anchorText: "Orthodontic Practice Marketing Platform",
        href: "https://orthosite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "OrthoSite Practice Solutions",
        href: "https://orthosite.ai"
      }
    ]
  },
  {
    brand: "dental_site_ai",
    options: [
      {
        prefix: "",
        anchorText: "Dental Practice Website Design",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "DentalSite AI",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "",
        anchorText: "Dentist Website Builder",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "Built with ",
        anchorText: "AI Dental Marketing Platform",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "",
        anchorText: "Dental Clinic SEO & Patient Growth",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "Website by ",
        anchorText: "Dental Digital Solutions",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "",
        anchorText: "Dental Patient Acquisition Platform",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "Designed with ",
        anchorText: "AI-Powered Dental Website Builder",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "",
        anchorText: "Dental Practice Marketing Automation",
        href: "https://dentalsite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "DentalSite Practice Solutions",
        href: "https://dentalsite.ai"
      }
    ]
  },
  {
    brand: "fit_site_ai",
    options: [
      {
        prefix: "",
        anchorText: "Personal Trainer Website Builder",
        href: "https://fitsite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "FitSite AI",
        href: "https://fitsite.ai"
      },
      {
        prefix: "",
        anchorText: "Gym Website Design",
        href: "https://fitsite.ai"
      },
      {
        prefix: "Built with ",
        anchorText: "AI Fitness Marketing Platform",
        href: "https://fitsite.ai"
      },
      {
        prefix: "",
        anchorText: "Fitness Studio Website Builder",
        href: "https://fitsite.ai"
      },
      {
        prefix: "Website by ",
        anchorText: "Personal Training Digital Solutions",
        href: "https://fitsite.ai"
      },
      {
        prefix: "",
        anchorText: "Gym CRM & Member Management Platform",
        href: "https://fitsite.ai",
        suffix: " \u2013 FitSite"
      },
      {
        prefix: "Designed with ",
        anchorText: "AI-Powered Fitness Website Builder",
        href: "https://fitsite.ai"
      },
      {
        prefix: "",
        anchorText: "Fitness Business Marketing Automation",
        href: "https://fitsite.ai"
      },
      {
        prefix: "Powered by ",
        anchorText: "FitSite Gym Solutions",
        href: "https://fitsite.ai"
      }
    ]
  },
  {
    brand: "cast_kit",
    options: [
      {
        prefix: "",
        anchorText: "Podcast Website Builder",
        href: "https://castkit.com"
      },
      {
        prefix: "Powered by ",
        anchorText: "CastKit",
        href: "https://castkit.com"
      },
      {
        prefix: "",
        anchorText: "Podcaster Website & Hosting Platform",
        href: "https://castkit.com"
      },
      {
        prefix: "Built with ",
        anchorText: "AI Podcast Marketing Tools",
        href: "https://castkit.com"
      },
      {
        prefix: "",
        anchorText: "Podcast SEO & Content Repurposing",
        href: "https://castkit.com"
      },
      {
        prefix: "Website by ",
        anchorText: "Podcast Digital Solutions",
        href: "https://castkit.com"
      },
      {
        prefix: "",
        anchorText: "Podcast Distribution Platform",
        href: "https://castkit.com",
        suffix: " \u2013 CastKit"
      },
      {
        prefix: "Designed with ",
        anchorText: "AI-Powered Podcast Website Builder",
        href: "https://castkit.com"
      },
      {
        prefix: "",
        anchorText: "Podcast Show Notes & Transcript Platform",
        href: "https://castkit.com"
      },
      {
        prefix: "Powered by ",
        anchorText: "CastKit Podcasting Solutions",
        href: "https://castkit.com"
      }
    ]
  }
];
var brandAttributionMap = brandAttributionOptions.reduce(
  (acc, entry) => {
    acc[entry.brand] = entry.options;
    return acc;
  },
  {}
);
function buildTrackedHref(baseHref) {
  if (typeof window === "undefined") {
    return baseHref;
  }
  try {
    const url = new URL(baseHref);
    const source = window.location.host;
    const sourceRef = window.location.href;
    url.searchParams.set("source", source);
    url.searchParams.set("sourceRef", sourceRef);
    return url.toString();
  } catch {
    try {
      const url = new URL(baseHref, window.location.origin);
      const source = window.location.host;
      const sourceRef = window.location.href;
      url.searchParams.set("source", source);
      url.searchParams.set("sourceRef", sourceRef);
      return url.toString();
    } catch {
      return baseHref;
    }
  }
}
var BrandAttribution = ({
  variant = "span",
  containerClassName,
  linkClassName,
  internalBrandSlug,
  optionIndex
}) => {
  const options = brandAttributionMap[internalBrandSlug];
  if (!options || optionIndex < 0 || optionIndex >= options.length) {
    return null;
  }
  const { prefix = "", anchorText, href, suffix = "" } = options[optionIndex];
  const ContainerEl = variant;
  const [trackedHref, setTrackedHref] = React.useState(href);
  React.useEffect(() => {
    setTrackedHref(buildTrackedHref(href));
  }, [href]);
  return /* @__PURE__ */ jsxs(ContainerEl, { className: containerClassName, children: [
    prefix,
    /* @__PURE__ */ jsx(
      "a",
      {
        href: trackedHref,
        target: "_blank",
        rel: "noreferrer noopener",
        className: linkClassName,
        children: anchorText
      }
    ),
    suffix
  ] });
};
var maxWidthStyles = {
  sm: "max-w-screen-sm",
  md: "max-w-screen-md",
  lg: "max-w-screen-lg",
  xl: "max-w-7xl",
  "2xl": "max-w-screen-2xl",
  "4xl": "max-w-[1536px]",
  full: "max-w-full"
};
var Container = React__default.forwardRef(
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
    const Component = as;
    return /* @__PURE__ */ jsx(
      Component,
      {
        ref,
        className: cn(
          "mx-auto w-full px-2 sm:px-4 lg:px-8",
          maxWidthStyles[maxWidth],
          className
        ),
        ...props,
        children
      }
    );
  }
);
Container.displayName = "Container";

// lib/patternSvgs.ts
var patternSvgs = {
  squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
  grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
  noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
  dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
  dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
  dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
  circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
  waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
  crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
  architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
  tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
  p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
};
var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxs(
  "svg",
  {
    className: "h-full w-full",
    xmlns: "http://www.w3.org/2000/svg",
    style: mask ? {
      maskImage: mask,
      WebkitMaskImage: mask
    } : void 0,
    children: [
      /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
        "pattern",
        {
          id,
          x: "0",
          y: "0",
          width: "100",
          height: "100",
          patternUnits: "userSpaceOnUse",
          children: [
            /* @__PURE__ */ jsx(
              "path",
              {
                d: "M0 50h40M60 50h40M50 0v40M50 60v40",
                stroke: "hsl(var(--muted))",
                strokeWidth: "1",
                fill: "none"
              }
            ),
            /* @__PURE__ */ jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
            /* @__PURE__ */ jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
            /* @__PURE__ */ jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
            /* @__PURE__ */ jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
            /* @__PURE__ */ jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
          ]
        }
      ) }),
      /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
    ]
  }
);
var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxs(
  "svg",
  {
    className: "h-full w-full",
    xmlns: "http://www.w3.org/2000/svg",
    style: mask ? {
      maskImage: mask,
      WebkitMaskImage: mask
    } : void 0,
    children: [
      /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
        "pattern",
        {
          id,
          x: "0",
          y: "0",
          width: "40",
          height: "40",
          patternUnits: "userSpaceOnUse",
          children: [
            /* @__PURE__ */ jsx(
              "path",
              {
                d: "M0 20h40M20 0v40",
                stroke: "hsl(var(--muted))",
                strokeWidth: "0.5",
                fill: "none"
              }
            ),
            /* @__PURE__ */ jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
          ]
        }
      ) }),
      /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
    ]
  }
);
var gridPattern = (size, mask) => /* @__PURE__ */ jsx(
  "div",
  {
    className: "h-full w-full bg-[linear-gradient(to_right,_hsl(var(--muted))_1px,_transparent_1px),linear-gradient(to_bottom,_hsl(var(--muted))_1px,_transparent_1px)]",
    style: {
      backgroundSize: `${size}px ${size}px`,
      ...mask ? {
        maskImage: mask,
        WebkitMaskImage: mask
      } : {}
    }
  }
);
var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsx(
  "div",
  {
    className: "h-full w-full",
    style: {
      backgroundImage: "repeating-linear-gradient(45deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px), repeating-linear-gradient(135deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px)",
      ...mask ? {
        maskImage: mask,
        WebkitMaskImage: mask
      } : {}
    }
  }
);
var dashedGridMaskBase = "repeating-linear-gradient(to right, black 0px, black 3px, transparent 3px, transparent 8px), repeating-linear-gradient(to bottom, black 0px, black 3px, transparent 3px, transparent 8px)";
var dashedGridPattern = (fadeMask) => {
  const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
  return /* @__PURE__ */ jsx(
    "div",
    {
      className: "h-full w-full",
      style: {
        backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
        backgroundSize: "20px 20px",
        backgroundPosition: "0 0, 0 0",
        maskImage: mask,
        WebkitMaskImage: mask,
        maskComposite: "intersect",
        WebkitMaskComposite: "source-in"
      }
    }
  );
};
var gradientGlow = (position) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      "pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
      position === "top" ? "-top-1/4" : "-bottom-1/4"
    ),
    style: {
      background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
    }
  }
);
var spotlight = (position) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      "pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
      position === "left" ? "-left-1/4" : "-right-1/4"
    ),
    style: {
      background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
    }
  }
);
var patternOverlays = {
  circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
  circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
  circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
  circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
  circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
  circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
  circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
  circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
  dashedGridBasic: () => dashedGridPattern(),
  dashedGridFadeTop: () => dashedGridPattern(maskTop),
  dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
  dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
  dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
  dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
  dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
  dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
  diagonalCrossBasic: () => diagonalCrossPattern(),
  diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
  diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
  diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
  diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
  diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
  diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
  diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
  gridBasic: () => gridPattern(40),
  gridFadeTop: () => gridPattern(32, maskTop),
  gridFadeBottom: () => gridPattern(32, maskBottom),
  gridFadeCenter: () => gridPattern(40, maskCenter),
  gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
  gridFadeTopRight: () => gridPattern(32, maskTopRight),
  gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
  gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
  gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
  gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
  gradientGlowTop: () => gradientGlow("top"),
  gradientGlowBottom: () => gradientGlow("bottom"),
  spotlightLeft: () => spotlight("left"),
  spotlightRight: () => spotlight("right")
};
var inlinePatternStyles = {
  radialGradientTop: {
    background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
  },
  radialGradientBottom: {
    background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
  }
};
function PatternBackground({
  pattern,
  opacity = 0.08,
  className,
  style
}) {
  if (!pattern) {
    return null;
  }
  if (pattern in inlinePatternStyles) {
    const inlineStyle = inlinePatternStyles[pattern];
    return /* @__PURE__ */ jsx(
      "div",
      {
        className: cn("pointer-events-none absolute inset-0 z-0", className),
        style: { ...inlineStyle, opacity, ...style },
        "aria-hidden": "true"
      }
    );
  }
  if (pattern in patternOverlays) {
    const Overlay = patternOverlays[pattern];
    return /* @__PURE__ */ jsx(
      "div",
      {
        className: cn("pointer-events-none absolute inset-0 z-0", className),
        style: { opacity, ...style },
        "aria-hidden": "true",
        children: Overlay()
      }
    );
  }
  const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
  return /* @__PURE__ */ jsx(
    "div",
    {
      className: cn("pointer-events-none absolute inset-0 z-0", className),
      style: {
        backgroundImage: `url(${patternUrl})`,
        backgroundRepeat: "repeat",
        backgroundSize: "auto",
        opacity,
        ...style
      },
      "aria-hidden": "true"
    }
  );
}
var backgroundStyles = {
  default: "bg-background text-foreground",
  white: "bg-white text-dark",
  gray: "bg-muted/30 text-foreground",
  dark: "bg-foreground text-background",
  transparent: "bg-transparent text-foreground",
  gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
  primary: "bg-primary text-primary-foreground",
  secondary: "bg-secondary text-secondary-foreground",
  muted: "bg-muted text-muted-foreground"
};
var spacingStyles = {
  none: "py-0 md:py-0",
  sm: "py-12 md:py-16",
  md: "py-16 md:py-24",
  lg: "py-20 md:py-32",
  xl: "py-24 md:py-40"
};
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
var Section = React__default.forwardRef(
  ({
    id,
    title,
    subtitle,
    children,
    className,
    style,
    background = "default",
    spacing = "lg",
    pattern,
    patternOpacity,
    patternClassName,
    containerClassName,
    containerMaxWidth = "xl",
    ...props
  }, ref) => {
    const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
    return /* @__PURE__ */ jsxs(
      "section",
      {
        ref,
        id,
        className: cn(
          "relative",
          pattern ? "overflow-hidden" : null,
          backgroundStyles[background],
          isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
          className
        ),
        style,
        ...props,
        children: [
          /* @__PURE__ */ jsx(
            PatternBackground,
            {
              pattern,
              opacity: effectivePatternOpacity,
              className: patternClassName
            }
          ),
          /* @__PURE__ */ jsxs(
            Container,
            {
              maxWidth: containerMaxWidth,
              className: cn("relative z-10", containerClassName),
              children: [
                (title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "mb-6 text-center md:mb-16", children: [
                  subtitle && /* @__PURE__ */ jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider", children: subtitle }),
                  title && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
                ] }),
                children
              ]
            }
          )
        ]
      }
    );
  }
);
Section.displayName = "Section";
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
function DynamicIcon({ apiKey, ...props }) {
  return /* @__PURE__ */ jsx(Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
}
var platformIconMap = {
  instagram: "cib/instagram",
  linkedin: "cib/linkedin",
  google: "cib/google",
  facebook: "cib/facebook",
  tiktok: "cib/tiktok",
  youtube: "cib/youtube",
  yelp: "cib/yelp",
  spotify: "cib/spotify",
  apple: "cib/apple",
  x: "line-md/twitter-x-alt",
  github: "cib/github",
  snapchat: "cib/snapchat",
  discord: "cib/discord",
  dev: "simple-icons/devdotto",
  substack: "simple-icons/substack",
  reddit: "cib/reddit",
  pinterest: "cib/pinterest",
  threads: "simple-icons/threads",
  twitch: "cib/twitch",
  whatsapp: "cib/whatsapp",
  telegram: "cib/telegram",
  medium: "simple-icons/medium",
  patreon: "cib/patreon",
  onlyfans: "simple-icons/onlyfans",
  eventbrite: "cib/eventbrite",
  npmjs: "simple-icons/npm",
  crates: "cib/rust",
  rubygems: "cib/rubygems",
  behance: "cib/behance",
  dribbble: "cib/dribbble",
  unknown: "icon-park-solid/circular-connection"
};
var SocialLinkIcon = React.forwardRef(
  ({
    platformName,
    label,
    iconSize = 20,
    iconColor,
    href,
    iconClassName,
    className,
    iconNameOverride,
    ...pressableProps
  }, ref) => {
    const platform = usePlatformFromUrl(href);
    const smartPlatformName = React.useMemo(() => {
      return platform || platformName;
    }, [platform, platformName]);
    const iconName = React.useMemo(() => {
      return iconNameOverride || platformIconMap[smartPlatformName];
    }, [iconNameOverride, smartPlatformName]);
    const accessibleLabel = React.useMemo(() => {
      return label || platformName;
    }, [label, platformName]);
    return /* @__PURE__ */ jsx(
      Pressable,
      {
        ref,
        href,
        "aria-label": accessibleLabel,
        className: cn(
          "inline-flex items-center justify-center transition-colors",
          className
        ),
        ...pressableProps,
        children: /* @__PURE__ */ jsx(
          DynamicIcon,
          {
            name: iconName,
            size: iconSize,
            color: iconColor,
            className: iconClassName,
            alt: accessibleLabel
          }
        )
      }
    );
  }
);
SocialLinkIcon.displayName = "SocialLinkIcon";
function FooterSocialNewsletter({
  logo,
  sections,
  socialLinks,
  newsletterLabel,
  newsletterPlaceholder,
  newsletterButtonText,
  privacyLinkText,
  privacyLinkUrl,
  privacyConsentText,
  copyright,
  className,
  contentClassName,
  logoWrapperClassName,
  logoClassName,
  gridClassName,
  navSectionClassName,
  navTitleClassName,
  navLinksClassName,
  navLinkClassName,
  socialColumnClassName,
  socialLinksClassName,
  socialLinkClassName,
  newsletterClassName,
  newsletterInputClassName,
  newsletterButtonClassName,
  privacyClassName,
  bottomClassName,
  copyrightClassName,
  background,
  containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
  spacing = "py-6 md:py-32",
  pattern,
  patternOpacity,
  optixFlowConfig
}) {
  return /* @__PURE__ */ jsx(
    Section,
    {
      background,
      spacing,
      pattern,
      patternOpacity,
      className: cn(className),
      containerClassName,
      children: /* @__PURE__ */ jsx("div", { className: cn(contentClassName), children: /* @__PURE__ */ jsxs("footer", { children: [
        /* @__PURE__ */ jsxs("div", { className: "mb-20", children: [
          logo && /* @__PURE__ */ jsx(
            FooterLogo,
            {
              logo,
              logoClassName: cn(
                "flex items-center gap-2",
                logoWrapperClassName
              ),
              logoImageClassName: cn("h-10", logoClassName),
              optixFlowConfig
            }
          ),
          socialLinks && socialLinks.length > 0 && /* @__PURE__ */ jsx("div", { className: cn("mt-6", socialColumnClassName), children: /* @__PURE__ */ jsx(
            "ul",
            {
              className: cn(
                "flex items-center gap-4",
                socialLinksClassName
              ),
              children: socialLinks.map((social, idx) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
                SocialLinkIcon,
                {
                  href: social.href,
                  label: social.label,
                  iconNameOverride: social.iconNameOverride,
                  iconSize: 20,
                  className: cn(
                    "opacity-80 transition-colors hover:opacity-100",
                    socialLinkClassName
                  )
                }
              ) }, idx))
            }
          ) })
        ] }),
        sections && sections.length > 0 && /* @__PURE__ */ jsx(
          "div",
          {
            className: cn(
              "space-y-12 space-x-4 md:space-y-6 md:space-x-6 grid grid-cols-2 lg:grid-cols-4",
              gridClassName
            ),
            children: sections.map((section, sectionIdx) => /* @__PURE__ */ jsxs("div", { className: cn(navSectionClassName), children: [
              /* @__PURE__ */ jsx("h3", { className: cn("mb-4 font-bold", navTitleClassName), children: section.title }),
              /* @__PURE__ */ jsx("ul", { className: cn("space-y-4", navLinksClassName), children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsx(
                "li",
                {
                  className: cn("text-sm font-medium", navLinkClassName),
                  children: /* @__PURE__ */ jsx(Pressable, { href: link.href, children: link.name })
                },
                linkIdx
              )) })
            ] }, sectionIdx))
          }
        ),
        /* @__PURE__ */ jsxs(
          "div",
          {
            className: cn(
              "gap-14 md:gap-4 mt-16 flex flex-col-reverse border-t-0 md:border-t pt-4 md:pt-10 lg:flex-row lg:items-start lg:justify-between",
              bottomClassName
            ),
            children: [
              /* @__PURE__ */ jsxs(
                "div",
                {
                  className: cn(
                    "flex flex-col gap-2 text-sm font-medium opacity-80 md:flex-row md:items-center md:gap-4",
                    copyrightClassName
                  ),
                  children: [
                    /* @__PURE__ */ jsx(FooterCopyright, { copyright }),
                    /* @__PURE__ */ jsx(
                      BrandAttribution,
                      {
                        internalBrandSlug: "open_site_ai",
                        optionIndex: 7,
                        variant: "span",
                        linkClassName: "underline underline-offset-4 transition-colors hover:opacity-100"
                      }
                    )
                  ]
                }
              ),
              (newsletterLabel || newsletterButtonText) && /* @__PURE__ */ jsxs(
                "div",
                {
                  className: cn(
                    "flex w-full flex-col gap-2 lg:w-auto lg:max-w-md",
                    newsletterClassName
                  ),
                  children: [
                    /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row items-stretch", children: [
                      /* @__PURE__ */ jsx(
                        "input",
                        {
                          type: "email",
                          id: "newsletter-email",
                          placeholder: newsletterPlaceholder || "Enter your email",
                          className: cn(
                            "flex h-10 w-full rounded-l-md rounded-r-none border border-r-0 border-input px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 sm:w-64",
                            newsletterInputClassName
                          )
                        }
                      ),
                      newsletterButtonText && /* @__PURE__ */ jsx(
                        Pressable,
                        {
                          onClick: (e) => {
                            e.preventDefault();
                          },
                          variant: "default",
                          size: "icon",
                          asButton: true,
                          className: cn(
                            "rounded-l-none rounded-r-md shrink-0 h-10",
                            newsletterButtonClassName
                          ),
                          children: /* @__PURE__ */ jsx(DynamicIcon, { name: "feather/send" })
                        }
                      )
                    ] }),
                    (privacyConsentText || privacyLinkText) && /* @__PURE__ */ jsxs("p", { className: cn("text-xs opacity-70", privacyClassName), children: [
                      privacyConsentText,
                      privacyLinkText && /* @__PURE__ */ jsx(
                        Pressable,
                        {
                          href: privacyLinkUrl || "#",
                          className: "ml-1 underline hover:opacity-100",
                          children: privacyLinkText
                        }
                      )
                    ] })
                  ]
                }
              )
            ]
          }
        )
      ] }) })
    }
  );
}

export { FooterSocialNewsletter };
