import { Box, Button, Divider, HorizontalScroll, ToggleButton } from "@wix/design-system";
import { Sparkles } from "@wix/wix-ui-icons-common";
import React from "react";
import classes from "./preset-bar-scss.js";
const FIX_BUTTON_PRESET = { id: "fix", label: "Fix", icon: /* @__PURE__ */ React.createElement(Sparkles, null) };
const PresetBar = ({
  presets,
  selectedPresetId,
  onPresetSelect,
  showFixButton
}) => {
  return /* @__PURE__ */ React.createElement(HorizontalScroll, { scrollButtonSize: "tiny" }, /* @__PURE__ */ React.createElement(Box, { className: classes.root, gap: "SP1" }, showFixButton && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
    Button,
    {
      prefixIcon: /* @__PURE__ */ React.createElement(Sparkles, null),
      onClick: () => {
        onPresetSelect(FIX_BUTTON_PRESET);
      },
      skin: "ai",
      priority: "secondary",
      size: "small"
    },
    "Fix it"
  ), /* @__PURE__ */ React.createElement(Divider, { direction: "vertical" })), presets.map((preset) => /* @__PURE__ */ React.createElement(
    PresetToggle,
    {
      key: preset.id,
      preset,
      selected: selectedPresetId === preset.id,
      onClick: () => onPresetSelect(preset)
    }
  ))));
};
const PresetList = ({
  presets,
  onPresetSelect
}) => {
  return /* @__PURE__ */ React.createElement(HorizontalScroll, { scrollButtonSize: "tiny" }, /* @__PURE__ */ React.createElement(Box, { gap: "SP1" }, presets.map((preset) => /* @__PURE__ */ React.createElement(
    "button",
    {
      key: preset.id,
      className: classes.presetListItem,
      onClick: () => onPresetSelect(preset),
      type: "button"
    },
    preset.icon,
    preset.label
  ))));
};
const PresetToggle = ({ preset, selected, onClick, skin }) => {
  return /* @__PURE__ */ React.createElement(
    ToggleButton,
    {
      key: preset.id,
      selected,
      onClick,
      skin: skin ?? "standard",
      size: "small",
      labelValue: preset.label,
      shape: "pill",
      border: true,
      children: preset.icon
    }
  );
};
export {
  FIX_BUTTON_PRESET,
  PresetBar,
  PresetList
};
//# sourceMappingURL=preset-bar.js.map
