"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _chunkWF7Z2VITcjs = require('./chunk-WF7Z2VIT.cjs');


var _chunkOBHJBBPCcjs = require('./chunk-OBHJBBPC.cjs');




var _chunkZ6EUSUADcjs = require('./chunk-Z6EUSUAD.cjs');

// src/components/MultiToggle.tsx
var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);
var _jsxruntime = require('@emotion/react/jsx-runtime');
var _react = require('@emotion/react');
function MultiToggle({
  options,
  selectedOption,
  onChange,
  selectedBgColor = "c1Neutral",
  selectedColor = "hcNeutral",
  bgColor = "c4Neutral",
  color = "mcNeutral"
}) {
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledMultiToggle, { bgColor, children: options.map((_a) => {
    var _b = _a, { key } = _b, optionProps = _chunkZ6EUSUADcjs.__objRest.call(void 0, _b, ["key"]);
    let content = null;
    if ("name" in optionProps) {
      content = /* @__PURE__ */ _react.createElement.call(void 0, 
        _chunkWF7Z2VITcjs.Icon,
        _chunkZ6EUSUADcjs.__spreadProps.call(void 0, _chunkZ6EUSUADcjs.__spreadValues.call(void 0, {}, optionProps), {
          width: 11,
          key,
          color: key === selectedOption ? selectedColor : color
        })
      );
    } else {
      content = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: { fontSize: "11px", lineHeight: "11px" }, children: optionProps.text });
    }
    return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, 
      StyledMultiToggleOption,
      {
        onClick: () => onChange(key),
        selected: key === selectedOption,
        selectedBgColor,
        selectedColor,
        colorProp: color,
        children: content
      },
      key
    );
  }) });
}
var StyledMultiToggle = _styled2.default.div`
  border-radius: 999px;
  background: ${({ theme, bgColor }) => _chunkOBHJBBPCcjs.getColor.call(void 0, theme, bgColor)};
  padding: 2px;
  gap: 2px;
  display: flex;
`;
var StyledMultiToggleOption = _styled2.default.div`
  display: flex;
  cursor: pointer;
  border-radius: 999px;
  padding: 4px;
  background: ${({ theme, selected, selectedBgColor }) => selected ? _chunkOBHJBBPCcjs.getColor.call(void 0, theme, selectedBgColor) : "transparent"};
`;



exports.MultiToggle = MultiToggle;
