"use client";
'use strict';

var React = require('react');
var img = require('@page-speed/img');
var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var classVarianceAuthority = require('class-variance-authority');
var jsxRuntime = require('react/jsx-runtime');
var reactSlot = require('@radix-ui/react-slot');
var AvatarPrimitive = require('@radix-ui/react-avatar');
var TabsPrimitive = require('@radix-ui/react-tabs');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespace(React);
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);

// components/blocks/resource-list/resource-list-featured-grid.tsx
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.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__namespace.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__namespace.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__namespace.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__namespace.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__namespace.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 = classVarianceAuthority.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__namespace.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__ */ jsxRuntime.jsx(
        "a",
        {
          ref,
          href: normalizedHref,
          target,
          rel,
          ...commonProps,
          ...props,
          children
        }
      );
    }
    if (finalComponentType === "button") {
      return /* @__PURE__ */ jsxRuntime.jsx(
        "button",
        {
          ref,
          type: props.type || "button",
          ...commonProps,
          ...props,
          children
        }
      );
    }
    if (finalComponentType === "div") {
      return /* @__PURE__ */ jsxRuntime.jsx(
        "div",
        {
          ref,
          ...commonProps,
          children
        }
      );
    }
    return /* @__PURE__ */ jsxRuntime.jsx(
      "span",
      {
        ref,
        ...commonProps,
        children
      }
    );
  }
);
Pressable.displayName = "Pressable";
var svgCache = /* @__PURE__ */ new Map();
function DynamicIcon({
  name,
  size = 28,
  color,
  className,
  alt
}) {
  const [svgContent, setSvgContent] = React__namespace.useState(null);
  const [isLoading, setIsLoading] = React__namespace.useState(true);
  const [error, setError] = React__namespace.useState(null);
  const { url, iconName } = React__namespace.useMemo(() => {
    const separator = name.includes("/") ? "/" : ":";
    const [prefix, iconName2] = name.split(separator);
    const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
    return {
      url: baseUrl,
      iconName: iconName2
    };
  }, [name, size]);
  React__namespace.useEffect(() => {
    let isMounted = true;
    const fetchSvg = async () => {
      const cached = svgCache.get(url);
      if (cached) {
        if (isMounted) {
          setSvgContent(cached);
          setIsLoading(false);
        }
        return;
      }
      try {
        setIsLoading(true);
        setError(null);
        const response = await fetch(url);
        if (!response.ok) {
          throw new Error(`Failed to fetch icon: ${response.status}`);
        }
        let svg = await response.text();
        svg = processSvgForCurrentColor(svg);
        svgCache.set(url, svg);
        if (isMounted) {
          setSvgContent(svg);
          setIsLoading(false);
        }
      } catch (err) {
        if (isMounted) {
          setError(err instanceof Error ? err.message : "Failed to load icon");
          setIsLoading(false);
        }
      }
    };
    fetchSvg();
    return () => {
      isMounted = false;
    };
  }, [url]);
  if (isLoading) {
    return /* @__PURE__ */ jsxRuntime.jsx(
      "span",
      {
        className: cn("inline-block", className),
        style: { width: size, height: size },
        "aria-hidden": "true"
      }
    );
  }
  if (error || !svgContent) {
    return /* @__PURE__ */ jsxRuntime.jsx(
      "span",
      {
        className: cn("inline-block", className),
        style: { width: size, height: size },
        role: "img",
        "aria-label": alt || iconName
      }
    );
  }
  return /* @__PURE__ */ jsxRuntime.jsx(
    "span",
    {
      className: cn("inline-flex items-center justify-center", className),
      style: {
        width: size,
        height: size,
        color: color || "inherit"
      },
      role: "img",
      "aria-label": alt || iconName,
      dangerouslySetInnerHTML: { __html: svgContent }
    }
  );
}
function processSvgForCurrentColor(svg) {
  let processed = svg;
  processed = processed.replace(
    /stroke=["'](#000000|#000|black)["']/gi,
    'stroke="currentColor"'
  );
  processed = processed.replace(
    /fill=["'](#000000|#000|black)["']/gi,
    'fill="currentColor"'
  );
  return processed;
}
var badgeVariants = classVarianceAuthority.cva(
  "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
  {
    variants: {
      variant: {
        default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
        secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
        destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
        outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
function Badge({
  className,
  variant,
  asChild = false,
  ...props
}) {
  const Comp = asChild ? reactSlot.Slot : "span";
  return /* @__PURE__ */ jsxRuntime.jsx(
    Comp,
    {
      "data-slot": "badge",
      className: cn(badgeVariants({ variant }), className),
      ...props
    }
  );
}
function Avatar({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    AvatarPrimitive__namespace.Root,
    {
      "data-slot": "avatar",
      className: cn(
        "relative flex size-8 shrink-0 overflow-hidden rounded-full",
        className
      ),
      ...props
    }
  );
}
function AvatarImage({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    AvatarPrimitive__namespace.Image,
    {
      "data-slot": "avatar-image",
      className: cn("aspect-square size-full", className),
      ...props
    }
  );
}
function Tabs({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    TabsPrimitive__namespace.Root,
    {
      "data-slot": "tabs",
      className: cn("flex flex-col gap-2", className),
      ...props
    }
  );
}
function TabsList({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    TabsPrimitive__namespace.List,
    {
      "data-slot": "tabs-list",
      className: cn(
        "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
        className
      ),
      ...props
    }
  );
}
function TabsTrigger({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    TabsPrimitive__namespace.Trigger,
    {
      "data-slot": "tabs-trigger",
      className: cn(
        "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        className
      ),
      ...props
    }
  );
}

// lib/blockBrandedIconsAndPlaceholders.ts
var blockBrandedIconsAndPlaceholders = {
  placeholderDark1: "https://cdn.ing/assets/files/record/286201/l8f27khqrs9eumdi9r0ihvbe886u",
  placeholderDark2: "https://cdn.ing/assets/files/record/286210/jdwpoe6le13i7l4hn0er8ay9t5n9",
  placeholderDark3: "https://cdn.ing/assets/files/record/286211/1d12hqfn5zpsfloai89gqq98kht0",
  avatar1: "https://cdn.ing/assets/i/r/286239/ebm7o3j2kx48vw98emnwjaf5qvl6/avatar-1.webp",
  avatar2: "https://cdn.ing/assets/i/r/286240/vgf3rrkwn0769pfdtpal60uo5vpw/avatar-2.webp",
  avatar3: "https://cdn.ing/assets/i/r/286241/05vbqt3lls0q974r8fv4zn0njllq/avatar-3.webp"};
var defaultCategories = ["All", "Data", "AI", "Security", "News"];
var defaultFeaturedArticle = {
  title: "Getting Started With Modern Digital Platforms and Infrastructure",
  imageUrl: blockBrandedIconsAndPlaceholders.placeholderDark1,
  date: "Dec 4, 2024",
  authors: [
    blockBrandedIconsAndPlaceholders.avatar1,
    blockBrandedIconsAndPlaceholders.avatar2,
    blockBrandedIconsAndPlaceholders.avatar3
  ],
  link: "#",
  badge: "Featured Article"
};
var defaultSecondaryArticles = [
  {
    title: "Streamlining Business Operations Through Effective Workflow Automation",
    imageUrl: blockBrandedIconsAndPlaceholders.placeholderDark2,
    date: "Feb 12, 2024",
    authors: [blockBrandedIconsAndPlaceholders.avatar1],
    link: "#",
    badge: "Latest"
  },
  {
    title: "Boosting Overall Efficiency: How We Significantly Improved Search Performance",
    imageUrl: blockBrandedIconsAndPlaceholders.placeholderDark3,
    date: "Apr 1, 2025",
    authors: [blockBrandedIconsAndPlaceholders.avatar1],
    link: "#",
    badge: "Latest"
  }
];
var defaultArticles = [
  {
    title: "Exploring the Depths of Modern Data Analytics Techniques and Applications",
    category: "Data",
    date: "Dec 4, 2024",
    author: [
      blockBrandedIconsAndPlaceholders.avatar1,
      blockBrandedIconsAndPlaceholders.avatar2,
      blockBrandedIconsAndPlaceholders.avatar3
    ],
    link: "#"
  },
  {
    title: "Navigating the Complex Landscape of Artificial Intelligence and Advanced Machine Learning",
    category: "AI",
    date: "Dec 3, 2024",
    author: [
      blockBrandedIconsAndPlaceholders.avatar2,
      blockBrandedIconsAndPlaceholders.avatar3
    ],
    link: "#"
  },
  {
    title: "Fortifying Digital Defenses: Implementing Advanced Cybersecurity Strategies for Modern Enterprises",
    category: "Security",
    date: "Dec 2, 2024",
    author: [
      blockBrandedIconsAndPlaceholders.avatar1,
      blockBrandedIconsAndPlaceholders.avatar3
    ],
    link: "#"
  },
  {
    title: "Understanding and Exploring Distributed Computing Architectures and Concepts",
    category: "Data",
    date: "Dec 1, 2024",
    author: [blockBrandedIconsAndPlaceholders.avatar2],
    link: "#"
  },
  {
    title: "Recent Significant Scientific Breakthroughs in Advanced Quantum Technology Research",
    category: "News",
    date: "Nov 30, 2024",
    author: [
      blockBrandedIconsAndPlaceholders.avatar1,
      blockBrandedIconsAndPlaceholders.avatar2
    ],
    link: "#"
  },
  {
    title: "Applying Practical Machine Learning Techniques in Real-World Business Scenarios and Use Cases",
    category: "AI",
    date: "Nov 29, 2024",
    author: [
      blockBrandedIconsAndPlaceholders.avatar3,
      blockBrandedIconsAndPlaceholders.avatar1
    ],
    link: "#"
  }
];
function ResourceListFeaturedGrid({
  className,
  title = "Resources & Whitepapers",
  description = "Explore our thoughts and perspectives on key topics.",
  featuredArticle = defaultFeaturedArticle,
  secondaryArticles = defaultSecondaryArticles,
  articles = defaultArticles,
  categories = defaultCategories,
  latestUpdatesTitle = "Latest updates",
  optixFlowConfig
}) {
  const [selectedCategory, setSelectedCategory] = React.useState("All");
  const filteredArticles = articles.filter(
    (article) => selectedCategory === "All" || article.category === selectedCategory
  );
  return /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn("py-32", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container", children: [
    /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl font-medium sm:text-6xl md:text-7xl", children: title }),
    /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: description }),
    /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-10 grid grid-cols-1 gap-4 lg:grid-cols-12", children: [
      /* @__PURE__ */ jsxRuntime.jsxs(
        Pressable,
        {
          href: featuredArticle.link,
          className: "group relative isolate overflow-hidden rounded-2xl border border-border transition-transform duration-300 hover:-translate-y-0.5 lg:col-span-7 lg:row-span-2",
          children: [
            /* @__PURE__ */ jsxRuntime.jsx(
              img.Img,
              {
                src: featuredArticle.imageUrl,
                alt: featuredArticle.title,
                className: "size-full max-h-[550px] object-cover grayscale-100 transition-all duration-300 group-hover:grayscale-50",
                optixFlowConfig
              }
            ),
            /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-primary to-transparent" }),
            /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col justify-between p-8", children: [
              featuredArticle.badge && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: "w-fit border border-background/20 bg-background/15 backdrop-blur-sm", children: [
                /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/sparkles", size: 16, className: "mr-1" }),
                featuredArticle.badge
              ] }),
              /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
                /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-medium text-background", children: featuredArticle.title }),
                /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
                  /* @__PURE__ */ jsxRuntime.jsx("time", { className: "text-sm text-background/80", children: featuredArticle.date }),
                  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center -space-x-2", children: [
                    featuredArticle.authors.map((author, idx) => /* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "size-6 border border-primary", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: author }) }, idx)),
                    featuredArticle.authors.length > 2 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "z-10 grid size-6 place-items-center rounded-full border border-primary bg-primary/90 text-xs text-background backdrop-blur-sm", children: [
                      "+",
                      featuredArticle.authors.length - 2
                    ] })
                  ] })
                ] })
              ] })
            ] })
          ]
        }
      ),
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4 lg:col-span-5 lg:row-span-2 lg:flex-col", children: secondaryArticles.map((article, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
        Pressable,
        {
          href: article.link,
          className: "group relative isolate overflow-hidden rounded-2xl border border-border transition-transform duration-300 hover:-translate-y-0.5",
          children: [
            /* @__PURE__ */ jsxRuntime.jsx(
              img.Img,
              {
                src: article.imageUrl,
                alt: article.title,
                className: "size-full max-h-[267px] object-cover grayscale-100 transition-all duration-300 group-hover:grayscale-50",
                optixFlowConfig
              }
            ),
            /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-primary to-transparent" }),
            /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col justify-between p-8", children: [
              article.badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { className: "w-fit border border-background/20 bg-background/15 backdrop-blur-sm", children: article.badge }),
              /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
                /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-medium text-background", children: article.title }),
                /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
                  /* @__PURE__ */ jsxRuntime.jsx("time", { className: "text-sm text-background/80", children: article.date }),
                  article.authors.map((author, authorIdx) => /* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "size-6 border border-primary", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: author }) }, authorIdx))
                ] })
              ] })
            ] })
          ]
        },
        idx
      )) })
    ] }),
    /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-24", children: [
      /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mb-6 text-2xl font-medium md:text-3xl", children: latestUpdatesTitle }),
      /* @__PURE__ */ jsxRuntime.jsx(
        Tabs,
        {
          defaultValue: "All",
          className: "border-b border-border",
          onValueChange: setSelectedCategory,
          children: /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: "flex h-auto gap-2 bg-background p-0", children: categories.map((category) => /* @__PURE__ */ jsxRuntime.jsxs(
            TabsTrigger,
            {
              value: category,
              className: "group relative py-2.5 uppercase data-[state=active]:shadow-none",
              children: [
                category,
                /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -bottom-px group-data-[state=active]:h-px group-data-[state=active]:w-full group-data-[state=active]:bg-primary" })
              ]
            },
            category
          )) })
        }
      ),
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: filteredArticles.map((article, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
        Pressable,
        {
          href: article.link,
          className: "flex flex-col justify-between gap-4 border-b border-border py-6 md:flex-row",
          children: [
            /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium md:line-clamp-1", children: article.title }),
            /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full shrink-0 grid-cols-3 justify-between gap-2 md:grid md:max-w-80", children: [
              /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: article.category }),
              /* @__PURE__ */ jsxRuntime.jsx("time", { className: "text-sm text-muted-foreground", children: article.date }),
              /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden items-center justify-end -space-x-2 md:flex", children: article.author.map((author, authorIdx) => /* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "size-6 border border-border", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: author }) }, authorIdx)) })
            ] })
          ]
        },
        idx
      )) })
    ] })
  ] }) });
}

exports.ResourceListFeaturedGrid = ResourceListFeaturedGrid;
//# sourceMappingURL=resource-list-featured-grid.cjs.map
//# sourceMappingURL=resource-list-featured-grid.cjs.map