Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_chunk = require("../chunk-BN4qSVkS.cjs");
const require_styles_breakpoints = require("../styles/breakpoints.cjs");
const require_styles_common = require("../styles/common.cjs");
const require_styles_utils = require("../styles/utils.cjs");
const require_components_Button = require("./Button.cjs");
const require_styles_tokens_spacing = require("../styles/tokens/spacing.cjs");
let _emotion_styled = require("@emotion/styled");
_emotion_styled = require_chunk.__toESM(_emotion_styled);
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
//#region src/components/ButtonRow.tsx
function ButtonRow({ buttons, className, smSticky = true, bottomBorder = true, headerHeight = 0, ml }) {
	return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StyledButtonRow, {
		smSticky,
		headerHeight,
		bottomBorder,
		ml,
		children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StyledButtonRowButton, {
			className,
			children: buttons.map((button, idx) => button === "divider" ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(ButtonRowDivider, {}, idx) : /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_components_Button.Button, { ...button }, idx))
		})
	});
}
const StyledButtonRow = _emotion_styled.default.div`
  max-width: 100%;
  ${({ ml }) => typeof ml !== "undefined" ? `margin-left: ${ml}px;` : ``}
  ${({ theme }) => require_styles_breakpoints.bp.sm(`background: ${theme.bg}`)}
  ${({ headerHeight, smSticky, bottomBorder }) => require_styles_breakpoints.bp.sm(`
        ${smSticky ? `
            display: block;
            position: sticky;
            top: ${headerHeight}px;
            margin-top: 24px;
            margin-left: -${require_styles_common.standardContentInset.smPx}px;
            width: calc(100% + ${require_styles_common.standardContentInset.smPx * 2}px);
            max-width: calc(100% + ${require_styles_common.standardContentInset.smPx * 2}px);
            z-index: 2;` : `position: relative;`}
        ${bottomBorder ? `
            &:before {
              content: "";
              box-shadow: 0px 0px 9px 3px rgba(0, 0, 0, 0.09);
              height: 1px;
              position: absolute;
              background: black;
              bottom: 1px;
              width: 100%;
              z-index: 0;
            }
          ` : ``}
        z-index: 2;
      `)}
`;
const ButtonRowDivider = _emotion_styled.default.div`
  border-left: 1px #d9d9d9 solid;
  margin-left: 16px;
  padding-left: 16px;
`;
const StyledButtonRowButton = _emotion_styled.default.div`
  ${require_styles_utils.overflowAutoWithoutScrollbars}
  background: ${({ theme }) => theme.bg};
  display: flex;
  position: relative;
  z-index: 1;
  gap: ${require_styles_tokens_spacing.Spacing.px.xs};

  & ${ButtonRowDivider} + button,
  & ${ButtonRowDivider} + a {
    margin-left: 0;
  }

  ${require_styles_breakpoints.bp.sm(`
    padding: ${require_styles_common.standardContentInset.smPx}px;
  `)}
`;
//#endregion
exports.ButtonRow = ButtonRow;
exports.StyledButtonRow = StyledButtonRow;
exports.StyledButtonRowButton = StyledButtonRowButton;
