'use strict';

var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var React = require('react');
var jsxRuntime = require('react/jsx-runtime');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

// lib/utils.ts
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
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.default.forwardRef(
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
    const Component = as;
    return /* @__PURE__ */ jsxRuntime.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";
function PageHeroBanner({
  imageUrl,
  videoUrl,
  alt = "Hero banner",
  children,
  className = "",
  loading = "eager",
  minHeight = "500px",
  showOverlay = true,
  overlayOpacity = 0.6,
  contentMaxWidth = "4xl",
  overlayClassName,
  contentClassName,
  style,
  ...props
}) {
  if (!imageUrl && !videoUrl) {
    throw new Error("PageHeroBanner requires either imageUrl or videoUrl");
  }
  if (imageUrl && videoUrl) {
    throw new Error(
      "PageHeroBanner cannot have both imageUrl and videoUrl. Please provide only one."
    );
  }
  return /* @__PURE__ */ jsxRuntime.jsxs(
    "div",
    {
      className: cn("relative w-full overflow-hidden", className),
      style: {
        minHeight,
        ...style
      },
      ...props,
      children: [
        imageUrl && /* @__PURE__ */ jsxRuntime.jsx(
          "img",
          {
            src: imageUrl,
            alt,
            loading,
            className: "absolute inset-0 w-full h-full object-cover"
          }
        ),
        videoUrl && /* @__PURE__ */ jsxRuntime.jsx(
          "video",
          {
            src: videoUrl,
            className: "absolute inset-0 w-full h-full object-cover",
            autoPlay: true,
            loop: true,
            muted: true,
            playsInline: true,
            preload: "auto"
          }
        ),
        showOverlay && /* @__PURE__ */ jsxRuntime.jsx(
          "div",
          {
            className: cn(
              "absolute inset-0 bg-linear-to-b from-black via-black to-black",
              overlayClassName
            ),
            style: { opacity: overlayOpacity }
          }
        ),
        /* @__PURE__ */ jsxRuntime.jsx(
          Container,
          {
            maxWidth: contentMaxWidth,
            className: cn("relative h-full flex items-center", contentClassName),
            style: { minHeight },
            children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative text-background drop-shadow-lg py-16 md:py-24", children })
          }
        )
      ]
    }
  );
}

exports.PageHeroBanner = PageHeroBanner;
//# sourceMappingURL=page-hero-banner.cjs.map
//# sourceMappingURL=page-hero-banner.cjs.map