"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const dedent = require("dedent");
const styles_lib_components_Accordion_Accordion_playroom_cjs = require("../styles/lib/components/Accordion/Accordion.playroom.cjs");
const jsxRuntime = require("react/jsx-runtime");
const styles_lib_playroom_FrameComponent_cjs = require("../styles/lib/playroom/FrameComponent.cjs");
const React = require("react");
const uuid = require("uuid");
const styles_lib_components_Accordion_AccordionItem_cjs = require("../styles/lib/components/Accordion/AccordionItem.cjs");
const styles_lib_components_Alert_Alert_cjs = require("../styles/lib/components/Alert/Alert.cjs");
const styles_lib_components_Autosuggest_Autosuggest_cjs = require("../styles/lib/components/Autosuggest/Autosuggest.cjs");
const styles_lib_components_private_Placeholder_Placeholder_cjs = require("../styles/lib/components/private/Placeholder/Placeholder.cjs");
const styles_lib_components_Button_Button_cjs = require("../styles/lib/components/Button/Button.cjs");
const styles_lib_components_Box_Box_playroom_cjs = require("../styles/lib/components/Box/Box.playroom.cjs");
const styles_lib_components_ButtonIcon_ButtonIcon_cjs = require("../styles/lib/components/ButtonIcon/ButtonIcon.cjs");
const styles_lib_css_breakpoints_cjs = require("../styles/lib/css/breakpoints.cjs");
const styles_lib_css_atoms_atomicProperties_cjs = require("../styles/lib/css/atoms/atomicProperties.cjs");
const styles_lib_components_Columns_Columns_cjs = require("../styles/lib/components/Columns/Columns.cjs");
const styles_lib_components_Column_Column_cjs = require("../styles/lib/components/Column/Column.cjs");
const styles_lib_components_private_Modal_Modal_cjs = require("../styles/lib/components/private/Modal/Modal.cjs");
const styles_lib_components_Dropdown_Dropdown_cjs = require("../styles/lib/components/Dropdown/Dropdown.cjs");
const styles_lib_components_MonthPicker_MonthPicker_cjs = require("../styles/lib/components/MonthPicker/MonthPicker.cjs");
const styles_lib_components_Heading_Heading_cjs = require("../styles/lib/components/Heading/Heading.cjs");
const styles_lib_components_Pagination_Pagination_cjs = require("../styles/lib/components/Pagination/Pagination.cjs");
const styles_lib_components_List_List_cjs = require("../styles/lib/components/List/List.cjs");
const styles_lib_components_MenuItemCheckbox_MenuItemCheckbox_cjs = require("../styles/lib/components/MenuItemCheckbox/MenuItemCheckbox.cjs");
const styles_lib_components_OverflowMenu_OverflowMenu_cjs = require("../styles/lib/components/OverflowMenu/OverflowMenu.cjs");
const styles_lib_components_Rating_Rating_cjs = require("../styles/lib/components/Rating/Rating.cjs");
const styles_lib_components_Stack_Stack_cjs = require("../styles/lib/components/Stack/Stack.cjs");
const styles_lib_components_Tabs_Tab_cjs = require("../styles/lib/components/Tabs/Tab.cjs");
const styles_lib_components_Tabs_Tabs_cjs = require("../styles/lib/components/Tabs/Tabs.cjs");
const styles_lib_components_Tag_Tag_cjs = require("../styles/lib/components/Tag/Tag.cjs");
const styles_lib_components_Textarea_Textarea_cjs = require("../styles/lib/components/Textarea/Textarea.cjs");
const styles_lib_components_TextDropdown_TextDropdown_cjs = require("../styles/lib/components/TextDropdown/TextDropdown.cjs");
const styles_lib_components_Tiles_Tiles_cjs = require("../styles/lib/components/Tiles/Tiles.cjs");
const styles_lib_components_Toggle_Toggle_cjs = require("../styles/lib/components/Toggle/Toggle.cjs");
const styles_lib_components_TooltipRenderer_TooltipRenderer_cjs = require("../styles/lib/components/TooltipRenderer/TooltipRenderer.cjs");
const sideEffects_lib_components_BraidProvider_BraidProvider_cjs = require("../side-effects/lib/components/BraidProvider/BraidProvider.cjs");
const styles_lib_components_ContentBlock_ContentBlock_cjs = require("../styles/lib/components/ContentBlock/ContentBlock.cjs");
const styles_lib_components_Divider_Divider_cjs = require("../styles/lib/components/Divider/Divider.cjs");
const styles_lib_components_Hidden_Hidden_cjs = require("../styles/lib/components/Hidden/Hidden.cjs");
const styles_lib_components_HiddenVisually_HiddenVisually_cjs = require("../styles/lib/components/HiddenVisually/HiddenVisually.cjs");
const styles_lib_components_icons_IconRenderer_cjs = require("../styles/lib/components/icons/IconRenderer.cjs");
const styles_lib_components_Loader_Loader_cjs = require("../styles/lib/components/Loader/Loader.cjs");
const styles_lib_components_MenuRenderer_MenuRenderer_cjs = require("../styles/lib/components/MenuRenderer/MenuRenderer.cjs");
const styles_lib_components_private_Modal_ModalContent_cjs = require("../styles/lib/components/private/Modal/ModalContent.cjs");
const styles_lib_components_Page_Page_cjs = require("../styles/lib/components/Page/Page.cjs");
const styles_lib_components_Secondary_Secondary_cjs = require("../styles/lib/components/Secondary/Secondary.cjs");
const styles_lib_components_Stepper_Step_cjs = require("../styles/lib/components/Stepper/Step.cjs");
const styles_lib_components_Stepper_Stepper_cjs = require("../styles/lib/components/Stepper/Stepper.cjs");
const styles_lib_components_Strong_Strong_cjs = require("../styles/lib/components/Strong/Strong.cjs");
const styles_lib_components_Tabs_TabPanel_cjs = require("../styles/lib/components/Tabs/TabPanel.cjs");
const styles_lib_components_TextLink_TextLink_cjs = require("../styles/lib/components/TextLink/TextLink.cjs");
const styles_lib_components_icons_IconArrow_IconArrow_cjs = require("../styles/lib/components/icons/IconArrow/IconArrow.cjs");
const styles_lib_components_icons_IconChevron_IconChevron_cjs = require("../styles/lib/components/icons/IconChevron/IconChevron.cjs");
const styles_lib_components_icons_IconThumb_IconThumb_cjs = require("../styles/lib/components/icons/IconThumb/IconThumb.cjs");
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
const dedent__default = /* @__PURE__ */ _interopDefaultCompat(dedent);
const useFallbackId = () => React.useRef(`fallbackId-${uuid.v4()}`).current;
const AccordionItem = ({
  id,
  label,
  stateName,
  expanded,
  onToggle,
  size,
  tone,
  weight,
  badge,
  icon,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    expanded,
    onToggle,
    false
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Accordion_AccordionItem_cjs.AccordionItem,
    {
      id: id ?? fallbackId,
      expanded: state,
      onToggle: handleChange,
      label: typeof label !== "boolean" ? label : "",
      size: typeof size === "boolean" ? void 0 : size,
      tone: typeof tone === "boolean" ? void 0 : tone,
      weight: typeof weight === "boolean" ? void 0 : weight,
      badge: typeof badge === "boolean" ? void 0 : badge,
      icon: typeof icon === "boolean" ? void 0 : icon,
      ...restProps
    }
  );
};
const Alert = ({ tone, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Alert_Alert_cjs.Alert,
  {
    tone: typeof tone !== "boolean" ? tone : void 0,
    ...restProps
  }
);
function Autosuggest({
  id,
  stateName,
  value,
  onChange,
  onClear,
  ...restProps
}) {
  const fallbackId = useFallbackId();
  const blankValue = { text: "" };
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    value,
    onChange,
    blankValue
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Autosuggest_Autosuggest_cjs.Autosuggest,
    {
      id: id ?? fallbackId,
      value: state,
      onChange: handleChange,
      onClear: () => {
        handleChange(blankValue);
        onClear == null ? void 0 : onClear();
      },
      ...restProps
    }
  );
}
const Badge = ({ tone, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_private_Placeholder_Placeholder_cjs.Badge,
  {
    tone: typeof tone !== "boolean" ? tone : void 0,
    ...restProps
  }
);
Badge.__isBadge__ = true;
const Bleed = ({ component, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Button_Button_cjs.Bleed,
  {
    component: component && styles_lib_components_Button_Button_cjs.validBleedComponents.indexOf(component) > -1 ? component : void 0,
    ...restProps
  }
);
const Button = React.forwardRef(
  ({ variant, tone, ...restProps }, ref) => {
    const isValidVariant = variant && styles_lib_components_Button_Button_cjs.buttonVariants.indexOf(variant) > -1;
    const isValidTone = tone && styles_lib_components_Button_Button_cjs.buttonTones.indexOf(tone) > -1;
    return /* @__PURE__ */ jsxRuntime.jsx(
      styles_lib_components_Button_Button_cjs.Button,
      {
        ref,
        variant: isValidVariant ? variant : void 0,
        tone: isValidTone ? tone : void 0,
        ...restProps
      }
    );
  }
);
Button.displayName = "Button";
const ButtonIcon = React.forwardRef(
  ({ variant, id, tone, ...restProps }, ref) => {
    const fallbackId = useFallbackId();
    const isValidVariant = variant && styles_lib_components_ButtonIcon_ButtonIcon_cjs.buttonIconVariants.indexOf(variant) > -1;
    const isValidTone = tone && styles_lib_components_ButtonIcon_ButtonIcon_cjs.buttonIconTones.indexOf(tone) > -1;
    return /* @__PURE__ */ jsxRuntime.jsx(
      styles_lib_components_ButtonIcon_ButtonIcon_cjs.ButtonIcon,
      {
        ref,
        id: id ?? fallbackId,
        variant: isValidVariant ? variant : void 0,
        tone: isValidTone ? tone : void 0,
        ...restProps
      }
    );
  }
);
ButtonIcon.displayName = "ButtonIcon";
const ButtonLink = React.forwardRef(
  ({ variant, ...restProps }, ref) => {
    const isValidVariant = variant && styles_lib_components_Button_Button_cjs.buttonVariants.indexOf(variant) > -1;
    return /* @__PURE__ */ jsxRuntime.jsx(
      styles_lib_components_private_Placeholder_Placeholder_cjs.ButtonLink,
      {
        ref,
        variant: isValidVariant ? variant : void 0,
        ...restProps
      }
    );
  }
);
ButtonLink.displayName = "ButtonLink";
const Card = ({ component, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_private_Placeholder_Placeholder_cjs.Card,
  {
    component: component && styles_lib_components_private_Placeholder_Placeholder_cjs.validCardComponents.indexOf(component) > -1 ? component : void 0,
    ...restProps
  }
);
const Checkbox = ({
  id,
  stateName,
  checked,
  onChange,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    checked,
    onChange,
    false
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Placeholder_Placeholder_cjs.Checkbox,
    {
      id: id ?? fallbackId,
      checked: state,
      onChange: handleChange,
      ...restProps
    }
  );
};
const CheckboxStandalone = ({
  id,
  stateName,
  checked,
  onChange,
  "aria-label": ariaLabel,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    checked,
    onChange,
    false
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Placeholder_Placeholder_cjs.CheckboxStandalone,
    {
      id: id ?? fallbackId,
      checked: state,
      onChange: handleChange,
      "aria-label": ariaLabel ?? "",
      ...restProps
    }
  );
};
const validSpaceValues = Object.keys(styles_lib_css_atoms_atomicProperties_cjs.space);
const cleanSpaceValue = (space) => {
  const validResponsiveObject = typeof space === "object" && Object.keys(space).some(
    (bp) => styles_lib_css_breakpoints_cjs.breakpointNames.includes(bp) && validSpaceValues.includes(space[bp])
  );
  const validArray = Array.isArray(space) && space.some((s) => validSpaceValues.includes(s));
  const validSpace = typeof space === "string" && validSpaceValues.includes(space);
  return validSpace || validResponsiveObject || validArray ? space : void 0;
};
const Columns = ({
  space,
  align,
  alignY,
  component,
  ...restProps
}) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Columns_Columns_cjs.Columns,
  {
    space: cleanSpaceValue(space) || "none",
    align: typeof align !== "boolean" ? align : void 0,
    alignY: typeof alignY !== "boolean" ? alignY : void 0,
    component: component && styles_lib_components_Column_Column_cjs.validColumnsComponents.indexOf(component) > -1 ? component : void 0,
    ...restProps
  }
);
const Dialog = ({
  id,
  stateName,
  open,
  onClose,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    open,
    onClose,
    false
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Modal_Modal_cjs.AllowCloseContext.Provider,
    {
      value: onClose !== void 0 || stateName !== void 0,
      children: /* @__PURE__ */ jsxRuntime.jsx(
        styles_lib_components_private_Placeholder_Placeholder_cjs.Dialog,
        {
          id: id ?? fallbackId,
          open: state,
          onClose: handleChange,
          ...restProps
        }
      )
    }
  );
};
const Disclosure = ({
  id,
  stateName,
  expanded,
  expandLabel,
  collapseLabel,
  onToggle,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    expanded,
    onToggle,
    false
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Placeholder_Placeholder_cjs.Disclosure,
    {
      id: id ?? fallbackId,
      expanded: state,
      onToggle: handleChange,
      expandLabel: typeof expandLabel !== "boolean" ? expandLabel : "",
      collapseLabel: typeof collapseLabel !== "boolean" ? collapseLabel : "",
      ...restProps
    }
  );
};
const Drawer = ({
  id,
  stateName,
  open,
  onClose,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    open,
    onClose,
    false
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Modal_Modal_cjs.AllowCloseContext.Provider,
    {
      value: onClose !== void 0 || stateName !== void 0,
      children: /* @__PURE__ */ jsxRuntime.jsx(
        styles_lib_components_private_Placeholder_Placeholder_cjs.Drawer,
        {
          id: id ?? fallbackId,
          ...restProps,
          open: state,
          onClose: handleChange
        }
      )
    }
  );
};
const Dropdown = ({
  id,
  stateName,
  value,
  onChange,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    value,
    onChange,
    ""
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Dropdown_Dropdown_cjs.Dropdown,
    {
      id: id ?? fallbackId,
      value: state,
      onChange: handleChange,
      ...restProps
    }
  );
};
const FieldLabel = ({
  id,
  htmlFor,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const fallbackFor = useFallbackId();
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_MonthPicker_MonthPicker_cjs.FieldLabel,
    {
      id: id ?? fallbackId,
      htmlFor: htmlFor ?? fallbackFor,
      ...restProps
    }
  );
};
const FieldMessage = ({
  id,
  tone,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_MonthPicker_MonthPicker_cjs.FieldMessage,
    {
      id: id ?? fallbackId,
      tone: tone && styles_lib_components_MonthPicker_MonthPicker_cjs.tones.indexOf(tone) > -1 ? tone : void 0,
      ...restProps
    }
  );
};
const Heading = ({ level, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_Heading_Heading_cjs.Heading, { level: level || "3", ...restProps });
const Inline = ({
  space,
  align,
  alignY,
  component,
  ...restProps
}) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Accordion_AccordionItem_cjs.Inline,
  {
    space: cleanSpaceValue(space) || "none",
    align: typeof align !== "boolean" ? align : void 0,
    alignY: typeof alignY !== "boolean" ? alignY : void 0,
    component: component && styles_lib_components_Accordion_AccordionItem_cjs.validInlineComponents.indexOf(component) > -1 ? component : void 0,
    ...restProps
  }
);
const Link = React.forwardRef(
  ({ href, onClick, ...restProps }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Pagination_Pagination_cjs.Link,
    {
      ref,
      href: href ?? "",
      onClick: onClick ? onClick : (event) => event == null ? void 0 : event.preventDefault(),
      ...restProps
    }
  )
);
const List = ({ space, ...props }) => {
  const cleanSpace = cleanSpaceValue(space);
  if (props.type === "icon" && (!("icon" in props) || !props.icon)) {
    return /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_List_List_cjs.List, { ...props, space: cleanSpace, icon: /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_Accordion_AccordionItem_cjs.IconClear, {}) });
  }
  return /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_List_List_cjs.List, { space: cleanSpace, ...props });
};
const MonthPicker = ({
  id,
  stateName,
  value,
  onChange,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    value,
    onChange,
    {}
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_MonthPicker_MonthPicker_cjs.MonthPicker,
    {
      id: id ?? fallbackId,
      value: state,
      onChange: handleChange,
      ...restProps
    }
  );
};
const MenuItem = ({ badge, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_private_Placeholder_Placeholder_cjs.MenuItem,
  {
    badge: typeof badge === "boolean" ? void 0 : badge,
    ...restProps
  }
);
MenuItem.__isMenuItem__ = true;
const MenuItemLink = ({ badge, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_private_Placeholder_Placeholder_cjs.MenuItemLink,
  {
    badge: typeof badge === "boolean" ? void 0 : badge,
    ...restProps
  }
);
MenuItemLink.__isMenuItem__ = true;
const MenuItemCheckbox = ({
  badge,
  ...restProps
}) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_MenuItemCheckbox_MenuItemCheckbox_cjs.MenuItemCheckbox,
  {
    badge: typeof badge === "boolean" ? void 0 : badge,
    ...restProps
  }
);
MenuItemCheckbox.__isMenuItem__ = true;
const Notice = ({ tone, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_private_Placeholder_Placeholder_cjs.Notice,
  {
    tone: typeof tone !== "boolean" ? tone : void 0,
    ...restProps
  }
);
const OverflowMenu = ({ id, ...restProps }) => {
  const fallbackId = useFallbackId();
  return /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_OverflowMenu_OverflowMenu_cjs.OverflowMenu, { id: id ?? fallbackId, ...restProps });
};
const defaultPage = 1;
const defaultTotal = 10;
const resolveFallbackPage = (page, total) => {
  if (typeof page === "number") {
    return page > 0 ? page : 1;
  }
  if (typeof total === "number" && total > 0) {
    return Math.ceil(total / 2);
  }
  return defaultPage;
};
const resolveFallbackTotal = (total, resolvedPage) => {
  if (typeof total === "number" && total > 0) {
    return total;
  }
  return resolvedPage > styles_lib_components_Pagination_Pagination_cjs.defaultPageLimit ? resolvedPage * 2 : defaultTotal;
};
const Pagination = ({
  page,
  total,
  linkProps,
  label,
  ...restProps
}) => {
  const fallbackPage = resolveFallbackPage(page, total);
  const fallbackTotal = resolveFallbackTotal(total, fallbackPage);
  const [currentPage, setCurrentPage] = React.useState(fallbackPage);
  const fallbackLinkProps = ({
    page: newPage
  }) => ({
    href: "#",
    onClick: (e) => {
      e.preventDefault();
      setCurrentPage(newPage);
    }
  });
  React.useEffect(() => {
    setCurrentPage(resolveFallbackPage(page, total));
  }, [page, total]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Pagination_Pagination_cjs.Pagination,
    {
      page: currentPage,
      total: total || fallbackTotal,
      label: label || `Page ${currentPage} of results`,
      linkProps: linkProps ?? fallbackLinkProps,
      ...restProps
    }
  );
};
const PasswordField = ({
  id,
  stateName,
  value,
  onChange,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    value,
    onChange,
    ""
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Placeholder_Placeholder_cjs.PasswordField,
    {
      id: id ?? fallbackId,
      value: state,
      onChange: handleChange,
      autoComplete: "off",
      ...restProps
    }
  );
};
const Radio = ({
  id,
  checked,
  onChange,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [fallbackChecked, setFallbackChecked] = React.useState(false);
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Placeholder_Placeholder_cjs.Radio,
    {
      id: id ?? fallbackId,
      checked: checked ?? fallbackChecked,
      onChange: onChange ? onChange : (event) => setFallbackChecked(event.currentTarget.checked),
      ...restProps
    }
  );
};
const RadioGroup = ({
  id,
  stateName,
  value,
  onChange,
  children,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(stateName, value, onChange);
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Placeholder_Placeholder_cjs.RadioGroup,
    {
      ...restProps,
      id: id ?? fallbackId,
      value: state,
      onChange: handleChange,
      children
    }
  );
};
const Rating = ({ rating, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Rating_Rating_cjs.Rating,
  {
    rating: typeof rating === "number" ? rating : 0,
    ...restProps
  }
);
const Stack = ({
  space,
  align,
  component,
  ...restProps
}) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Stack_Stack_cjs.Stack,
  {
    space: cleanSpaceValue(space) || "none",
    align: typeof align !== "boolean" ? align : void 0,
    component: component && styles_lib_components_Stack_Stack_cjs.validStackComponents.indexOf(component) > -1 ? component : void 0,
    ...restProps
  }
);
const TabsProvider = ({
  id,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  return /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_Tabs_Tab_cjs.TabsProvider, { id: id ?? fallbackId, ...restProps });
};
const Tabs = ({ label, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_Tabs_Tabs_cjs.Tabs, { label: "", ...restProps });
const Tab = ({ icon, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Tabs_Tab_cjs.Tab,
  {
    icon: typeof icon === "boolean" ? void 0 : icon,
    ...restProps
  }
);
Tab.__isTab__ = true;
const Tag = ({ icon, id, ...restProps }) => {
  const fallbackId = useFallbackId();
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Tag_Tag_cjs.Tag,
    {
      id: id ?? fallbackId,
      icon: typeof icon !== "boolean" ? icon : void 0,
      ...restProps
    }
  );
};
const Textarea = ({
  id,
  stateName,
  value,
  onChange,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    value,
    onChange,
    ""
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Textarea_Textarea_cjs.Textarea,
    {
      id: id ?? fallbackId,
      value: state,
      onChange: handleChange,
      autoComplete: "off",
      ...restProps
    }
  );
};
const fallbackOptions = ["TextDropdown"];
function resolveValue(value, options) {
  if (typeof value === "undefined") {
    if (Array.isArray(options) && options.length > 0) {
      return styles_lib_components_TextDropdown_TextDropdown_cjs.parseSimpleToComplexOption(options[0]).value;
    }
    return fallbackOptions[0];
  }
  return value;
}
function resolveOptions(options) {
  return Array.isArray(options) && options.length > 0 ? options : fallbackOptions;
}
function TextDropdown({
  id,
  value,
  label,
  onChange,
  options = fallbackOptions,
  ...restProps
}) {
  const fallbackId = useFallbackId();
  const [internalValue, setInternalValue] = React.useState(
    resolveValue(value, options)
  );
  const [internalOptions, setInternalOptions] = React.useState(
    resolveOptions(options)
  );
  React.useEffect(() => {
    if (options !== internalOptions) {
      setInternalOptions(resolveOptions(options));
      setInternalValue(resolveValue(value, options));
    }
  }, [internalOptions, value, options]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_TextDropdown_TextDropdown_cjs.TextDropdown,
    {
      id: id ?? fallbackId,
      label: label ?? "No label provided",
      value: internalValue,
      options: internalOptions,
      onChange: onChange ? onChange : setInternalValue,
      ...restProps
    }
  );
}
const TextField = ({
  id,
  stateName,
  value,
  onChange,
  onClear,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    value,
    onChange,
    ""
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_private_Placeholder_Placeholder_cjs.TextField,
    {
      id: id ?? fallbackId,
      value: state,
      onChange: handleChange,
      onClear: () => {
        handleChange({ currentTarget: { value: "" } });
        onClear == null ? void 0 : onClear();
      },
      autoComplete: "off",
      ...restProps
    }
  );
};
const Tiles = ({ space, columns, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Tiles_Tiles_cjs.Tiles,
  {
    space: cleanSpaceValue(space) || "none",
    columns: typeof columns === "boolean" || !columns ? 1 : columns,
    ...restProps
  }
);
const Toggle = ({
  id,
  stateName,
  on,
  onChange,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  const [state, handleChange] = styles_lib_playroom_FrameComponent_cjs.useFallbackState(
    stateName,
    on,
    onChange,
    false
  );
  return /* @__PURE__ */ jsxRuntime.jsx(
    styles_lib_components_Toggle_Toggle_cjs.Toggle,
    {
      id: id ?? fallbackId,
      on: state,
      onChange: handleChange,
      ...restProps
    }
  );
};
const TooltipRenderer = ({
  id,
  ...restProps
}) => {
  const fallbackId = useFallbackId();
  return /* @__PURE__ */ jsxRuntime.jsx(styles_lib_components_TooltipRenderer_TooltipRenderer_cjs.TooltipRenderer, { id: id ?? fallbackId, ...restProps });
};
const global = globalThis;
if (global.__IS_PLAYROOM_ENVIRONMENT__ !== "clearly") {
  throw new Error(dedent__default.default`
    Playroom prototyping components are being imported instead of Braid components.
    ‎
    These components must not be used in production. Please import from the top level Braid entry point:
    ‎
    -import { Component } from 'braid-design-system/playroom/components';
    +import { Component } from 'braid-design-system';
  `);
}
exports.Accordion = styles_lib_components_Accordion_Accordion_playroom_cjs.Accordion;
exports.IconAdd = styles_lib_components_Accordion_AccordionItem_cjs.IconAdd;
exports.IconBookmark = styles_lib_components_Accordion_AccordionItem_cjs.IconBookmark;
exports.IconCaution = styles_lib_components_Accordion_AccordionItem_cjs.IconCaution;
exports.IconClear = styles_lib_components_Accordion_AccordionItem_cjs.IconClear;
exports.IconCompany = styles_lib_components_Accordion_AccordionItem_cjs.IconCompany;
exports.IconCompose = styles_lib_components_Accordion_AccordionItem_cjs.IconCompose;
exports.IconCopy = styles_lib_components_Accordion_AccordionItem_cjs.IconCopy;
exports.IconCreditCard = styles_lib_components_Accordion_AccordionItem_cjs.IconCreditCard;
exports.IconCritical = styles_lib_components_Accordion_AccordionItem_cjs.IconCritical;
exports.IconDate = styles_lib_components_Accordion_AccordionItem_cjs.IconDate;
exports.IconDelete = styles_lib_components_Accordion_AccordionItem_cjs.IconDelete;
exports.IconDesktop = styles_lib_components_Accordion_AccordionItem_cjs.IconDesktop;
exports.IconDocument = styles_lib_components_Accordion_AccordionItem_cjs.IconDocument;
exports.IconDocumentBroken = styles_lib_components_Accordion_AccordionItem_cjs.IconDocumentBroken;
exports.IconDownload = styles_lib_components_Accordion_AccordionItem_cjs.IconDownload;
exports.IconEdit = styles_lib_components_Accordion_AccordionItem_cjs.IconEdit;
exports.IconEducation = styles_lib_components_Accordion_AccordionItem_cjs.IconEducation;
exports.IconEnlarge = styles_lib_components_Accordion_AccordionItem_cjs.IconEnlarge;
exports.IconFilter = styles_lib_components_Accordion_AccordionItem_cjs.IconFilter;
exports.IconFlag = styles_lib_components_Accordion_AccordionItem_cjs.IconFlag;
exports.IconGrid = styles_lib_components_Accordion_AccordionItem_cjs.IconGrid;
exports.IconHeart = styles_lib_components_Accordion_AccordionItem_cjs.IconHeart;
exports.IconHelp = styles_lib_components_Accordion_AccordionItem_cjs.IconHelp;
exports.IconHistory = styles_lib_components_Accordion_AccordionItem_cjs.IconHistory;
exports.IconHome = styles_lib_components_Accordion_AccordionItem_cjs.IconHome;
exports.IconImage = styles_lib_components_Accordion_AccordionItem_cjs.IconImage;
exports.IconInfo = styles_lib_components_Accordion_AccordionItem_cjs.IconInfo;
exports.IconInvoice = styles_lib_components_Accordion_AccordionItem_cjs.IconInvoice;
exports.IconLanguage = styles_lib_components_Accordion_AccordionItem_cjs.IconLanguage;
exports.IconLink = styles_lib_components_Accordion_AccordionItem_cjs.IconLink;
exports.IconLinkBroken = styles_lib_components_Accordion_AccordionItem_cjs.IconLinkBroken;
exports.IconList = styles_lib_components_Accordion_AccordionItem_cjs.IconList;
exports.IconLocation = styles_lib_components_Accordion_AccordionItem_cjs.IconLocation;
exports.IconMail = styles_lib_components_Accordion_AccordionItem_cjs.IconMail;
exports.IconMessage = styles_lib_components_Accordion_AccordionItem_cjs.IconMessage;
exports.IconMinus = styles_lib_components_Accordion_AccordionItem_cjs.IconMinus;
exports.IconMobile = styles_lib_components_Accordion_AccordionItem_cjs.IconMobile;
exports.IconMoney = styles_lib_components_Accordion_AccordionItem_cjs.IconMoney;
exports.IconNewWindow = styles_lib_components_Accordion_AccordionItem_cjs.IconNewWindow;
exports.IconNote = styles_lib_components_Accordion_AccordionItem_cjs.IconNote;
exports.IconNotification = styles_lib_components_Accordion_AccordionItem_cjs.IconNotification;
exports.IconOverflow = styles_lib_components_Accordion_AccordionItem_cjs.IconOverflow;
exports.IconPeople = styles_lib_components_Accordion_AccordionItem_cjs.IconPeople;
exports.IconPersonAdd = styles_lib_components_Accordion_AccordionItem_cjs.IconPersonAdd;
exports.IconPersonVerified = styles_lib_components_Accordion_AccordionItem_cjs.IconPersonVerified;
exports.IconPhone = styles_lib_components_Accordion_AccordionItem_cjs.IconPhone;
exports.IconPlatformAndroid = styles_lib_components_Accordion_AccordionItem_cjs.IconPlatformAndroid;
exports.IconPlatformApple = styles_lib_components_Accordion_AccordionItem_cjs.IconPlatformApple;
exports.IconPositive = styles_lib_components_Accordion_AccordionItem_cjs.IconPositive;
exports.IconPrint = styles_lib_components_Accordion_AccordionItem_cjs.IconPrint;
exports.IconProfile = styles_lib_components_Accordion_AccordionItem_cjs.IconProfile;
exports.IconPromote = styles_lib_components_Accordion_AccordionItem_cjs.IconPromote;
exports.IconRecommended = styles_lib_components_Accordion_AccordionItem_cjs.IconRecommended;
exports.IconRefresh = styles_lib_components_Accordion_AccordionItem_cjs.IconRefresh;
exports.IconResume = styles_lib_components_Accordion_AccordionItem_cjs.IconResume;
exports.IconSearch = styles_lib_components_Accordion_AccordionItem_cjs.IconSearch;
exports.IconSecurity = styles_lib_components_Accordion_AccordionItem_cjs.IconSecurity;
exports.IconSend = styles_lib_components_Accordion_AccordionItem_cjs.IconSend;
exports.IconSent = styles_lib_components_Accordion_AccordionItem_cjs.IconSent;
exports.IconSettings = styles_lib_components_Accordion_AccordionItem_cjs.IconSettings;
exports.IconShare = styles_lib_components_Accordion_AccordionItem_cjs.IconShare;
exports.IconSocialFacebook = styles_lib_components_Accordion_AccordionItem_cjs.IconSocialFacebook;
exports.IconSocialGitHub = styles_lib_components_Accordion_AccordionItem_cjs.IconSocialGitHub;
exports.IconSocialInstagram = styles_lib_components_Accordion_AccordionItem_cjs.IconSocialInstagram;
exports.IconSocialLinkedIn = styles_lib_components_Accordion_AccordionItem_cjs.IconSocialLinkedIn;
exports.IconSocialMedium = styles_lib_components_Accordion_AccordionItem_cjs.IconSocialMedium;
exports.IconSocialTwitter = styles_lib_components_Accordion_AccordionItem_cjs.IconSocialTwitter;
exports.IconSocialYouTube = styles_lib_components_Accordion_AccordionItem_cjs.IconSocialYouTube;
exports.IconStar = styles_lib_components_Accordion_AccordionItem_cjs.IconStar;
exports.IconStatistics = styles_lib_components_Accordion_AccordionItem_cjs.IconStatistics;
exports.IconSubCategory = styles_lib_components_Accordion_AccordionItem_cjs.IconSubCategory;
exports.IconTag = styles_lib_components_Accordion_AccordionItem_cjs.IconTag;
exports.IconTick = styles_lib_components_Accordion_AccordionItem_cjs.IconTick;
exports.IconTime = styles_lib_components_Accordion_AccordionItem_cjs.IconTime;
exports.IconTip = styles_lib_components_Accordion_AccordionItem_cjs.IconTip;
exports.IconUpload = styles_lib_components_Accordion_AccordionItem_cjs.IconUpload;
exports.IconVideo = styles_lib_components_Accordion_AccordionItem_cjs.IconVideo;
exports.IconVisibility = styles_lib_components_Accordion_AccordionItem_cjs.IconVisibility;
exports.IconWorkExperience = styles_lib_components_Accordion_AccordionItem_cjs.IconWorkExperience;
exports.IconZoomIn = styles_lib_components_Accordion_AccordionItem_cjs.IconZoomIn;
exports.IconZoomOut = styles_lib_components_Accordion_AccordionItem_cjs.IconZoomOut;
exports.Text = styles_lib_components_Accordion_AccordionItem_cjs.Text;
exports.useResponsiveValue = styles_lib_components_Autosuggest_Autosuggest_cjs.useResponsiveValue;
exports.Actions = styles_lib_components_private_Placeholder_Placeholder_cjs.Actions;
exports.BoxRenderer = styles_lib_components_private_Placeholder_Placeholder_cjs.BoxRenderer;
exports.Placeholder = styles_lib_components_private_Placeholder_Placeholder_cjs.Placeholder;
exports.RadioItem = styles_lib_components_private_Placeholder_Placeholder_cjs.RadioItem;
exports.TabPanels = styles_lib_components_private_Placeholder_Placeholder_cjs.TabPanels;
exports.TextLinkButton = styles_lib_components_private_Placeholder_Placeholder_cjs.TextLinkButton;
exports.ThemeNameConsumer = styles_lib_components_private_Placeholder_Placeholder_cjs.ThemeNameConsumer;
exports.ToastProvider = styles_lib_components_private_Placeholder_Placeholder_cjs.ToastProvider;
exports.filterSuggestions = styles_lib_components_private_Placeholder_Placeholder_cjs.filterSuggestions;
exports.useBreakpoint = styles_lib_components_private_Placeholder_Placeholder_cjs.useBreakpoint;
exports.useColor = styles_lib_components_private_Placeholder_Placeholder_cjs.useColor;
exports.useToast = styles_lib_components_private_Placeholder_Placeholder_cjs.useToast;
exports.Box = styles_lib_components_Box_Box_playroom_cjs.Box;
exports.Column = styles_lib_components_Column_Column_cjs.Column;
exports.useSpace = styles_lib_components_Tabs_Tab_cjs.useSpace;
exports.BraidPortal = styles_lib_components_TooltipRenderer_TooltipRenderer_cjs.BraidPortal;
exports.useThemeName = styles_lib_components_TooltipRenderer_TooltipRenderer_cjs.useThemeName;
exports.BraidProvider = sideEffects_lib_components_BraidProvider_BraidProvider_cjs.BraidProvider;
exports.makeLinkComponent = sideEffects_lib_components_BraidProvider_BraidProvider_cjs.makeLinkComponent;
exports.ContentBlock = styles_lib_components_ContentBlock_ContentBlock_cjs.ContentBlock;
exports.Divider = styles_lib_components_Divider_Divider_cjs.Divider;
exports.Hidden = styles_lib_components_Hidden_Hidden_cjs.Hidden;
exports.HiddenVisually = styles_lib_components_HiddenVisually_HiddenVisually_cjs.HiddenVisually;
exports.IconRenderer = styles_lib_components_icons_IconRenderer_cjs.IconRenderer;
exports.Loader = styles_lib_components_Loader_Loader_cjs.Loader;
exports.MenuItemDivider = styles_lib_components_MenuRenderer_MenuRenderer_cjs.MenuItemDivider;
exports.MenuRenderer = styles_lib_components_MenuRenderer_MenuRenderer_cjs.MenuRenderer;
exports.PageBlock = styles_lib_components_private_Modal_ModalContent_cjs.PageBlock;
exports.Page = styles_lib_components_Page_Page_cjs.Page;
exports.Secondary = styles_lib_components_Secondary_Secondary_cjs.Secondary;
exports.Step = styles_lib_components_Stepper_Step_cjs.Step;
exports.Stepper = styles_lib_components_Stepper_Stepper_cjs.Stepper;
exports.Strong = styles_lib_components_Strong_Strong_cjs.Strong;
exports.TabPanel = styles_lib_components_Tabs_TabPanel_cjs.TabPanel;
exports.TextLink = styles_lib_components_TextLink_TextLink_cjs.TextLink;
exports.IconArrow = styles_lib_components_icons_IconArrow_IconArrow_cjs.IconArrow;
exports.IconChevron = styles_lib_components_icons_IconChevron_IconChevron_cjs.IconChevron;
exports.IconThumb = styles_lib_components_icons_IconThumb_IconThumb_cjs.IconThumb;
exports.AccordionItem = AccordionItem;
exports.Alert = Alert;
exports.Autosuggest = Autosuggest;
exports.Badge = Badge;
exports.Bleed = Bleed;
exports.Button = Button;
exports.ButtonIcon = ButtonIcon;
exports.ButtonLink = ButtonLink;
exports.Card = Card;
exports.Checkbox = Checkbox;
exports.CheckboxStandalone = CheckboxStandalone;
exports.Columns = Columns;
exports.Dialog = Dialog;
exports.Disclosure = Disclosure;
exports.Drawer = Drawer;
exports.Dropdown = Dropdown;
exports.FieldLabel = FieldLabel;
exports.FieldMessage = FieldMessage;
exports.Heading = Heading;
exports.Inline = Inline;
exports.Link = Link;
exports.List = List;
exports.MenuItem = MenuItem;
exports.MenuItemCheckbox = MenuItemCheckbox;
exports.MenuItemLink = MenuItemLink;
exports.MonthPicker = MonthPicker;
exports.Notice = Notice;
exports.OverflowMenu = OverflowMenu;
exports.Pagination = Pagination;
exports.PasswordField = PasswordField;
exports.Radio = Radio;
exports.RadioGroup = RadioGroup;
exports.Rating = Rating;
exports.Stack = Stack;
exports.Tab = Tab;
exports.Tabs = Tabs;
exports.TabsProvider = TabsProvider;
exports.Tag = Tag;
exports.TextDropdown = TextDropdown;
exports.TextField = TextField;
exports.Textarea = Textarea;
exports.Tiles = Tiles;
exports.Toggle = Toggle;
exports.TooltipRenderer = TooltipRenderer;
