"use client";
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var pressable = require('@page-speed/pressable');
var img = require('@page-speed/img');
var jsxRuntime = require('react/jsx-runtime');

function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
var SIZE_CLASSES = {
  sm: "max-h-6 sm:max-h-7",
  md: "max-h-8 sm:max-h-9 lg:max-h-10",
  lg: "max-h-10 sm:max-h-12 lg:max-h-14",
  xl: "max-h-12 sm:max-h-14 lg:max-h-16"
};
var BrandLogo = ({
  logo,
  logoSlot,
  logoClassName,
  size = "md",
  optixFlowConfig
}) => {
  if (logoSlot) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: logoSlot });
  if (!logo || !logo.src) return null;
  const imgElement = /* @__PURE__ */ jsxRuntime.jsx(
    img.Img,
    {
      src: logo.src,
      className: cn(
        "w-auto object-contain",
        SIZE_CLASSES[size],
        logo.className
      ),
      alt: logo.alt || "Logo",
      optixFlowConfig,
      loading: "eager"
    }
  );
  if (logo.url) {
    return /* @__PURE__ */ jsxRuntime.jsx(
      pressable.Pressable,
      {
        href: logo.url,
        className: cn("flex items-center", logoClassName),
        children: imgElement
      }
    );
  }
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center", logoClassName), children: imgElement });
};
var brand_logo_default = BrandLogo;

exports.BrandLogo = BrandLogo;
exports.default = brand_logo_default;
