Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_chunk = require("../chunk-BN4qSVkS.cjs");
const require_styles_themes = require("../styles/themes.cjs");
const require_components_Icon_Icon = require("./Icon/Icon.cjs");
let _emotion_styled = require("@emotion/styled");
_emotion_styled = require_chunk.__toESM(_emotion_styled);
let _emotion_react = require("@emotion/react");
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
//#region src/components/MultiToggle.tsx
function MultiToggle({ options, selectedOption, onChange, selectedBgColor = "c1Neutral", selectedColor = "hcNeutral", bgColor = "c4Neutral", color = "mcNeutral" }) {
	return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StyledMultiToggle, {
		bgColor,
		children: options.map(({ key, ...optionProps }) => {
			let content = null;
			if ("name" in optionProps) content = /* @__PURE__ */ (0, _emotion_react.createElement)(require_components_Icon_Icon.Icon, {
				...optionProps,
				width: 11,
				key,
				color: key === selectedOption ? selectedColor : color
			});
			else content = /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", {
				css: {
					fontSize: "11px",
					lineHeight: "11px"
				},
				children: optionProps.text
			});
			return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StyledMultiToggleOption, {
				onClick: () => onChange(key),
				selected: key === selectedOption,
				selectedBgColor,
				selectedColor,
				colorProp: color,
				children: content
			}, key);
		})
	});
}
const StyledMultiToggle = _emotion_styled.default.div`
  border-radius: 999px;
  background: ${({ theme, bgColor }) => require_styles_themes.getColor(theme, bgColor)};
  padding: 2px;
  gap: 2px;
  display: flex;
`;
const StyledMultiToggleOption = _emotion_styled.default.div`
  display: flex;
  cursor: pointer;
  border-radius: 999px;
  padding: 4px;
  background: ${({ theme, selected, selectedBgColor }) => selected ? require_styles_themes.getColor(theme, selectedBgColor) : "transparent"};
`;
//#endregion
exports.MultiToggle = MultiToggle;
