"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Radio_stories_exports = {};
__export(Radio_stories_exports, {
  RadioGroup: () => RadioGroup,
  RadioGroupList: () => RadioGroupList,
  RadioGroupOutlined: () => RadioGroupOutlined,
  default: () => Radio_stories_default
});
module.exports = __toCommonJS(Radio_stories_exports);
var import_react = __toESM(require("react"));
var import_manager_api = require("@storybook/manager-api");
var import_index = __toESM(require("./index"));
var Radio_stories_default = {
  title: "Form/Radio",
  argTypes: {
    currentValue: {
      type: "text",
      description: "This is the current value. A RadioItem will be checked if its value matches this value.",
      control: false
    },
    name: {
      type: "text",
      description: "The name property is used to link all RadioItems",
      control: false
    },
    onChange: {
      control: false,
      description: "The callback receives the value of the pressed RadioItem as parameter",
      action: "clicked"
    }
  }
};
const TemplateElement = (args) => {
  const [currentArgs, updateArgs] = (0, import_manager_api.useArgs)();
  const handleChange = (value) => {
    updateArgs({ currentValue: value });
    currentArgs.onChange(value);
  };
  return /* @__PURE__ */ import_react.default.createElement(
    import_index.default,
    {
      ...args,
      onChange: handleChange,
      containerProps: { flexDirection: "column", rowGap: "1rem" }
    },
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { label: "Blue squad", value: "blue", variant: "default" }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { label: "Black squad", value: "black", variant: "main" }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { label: "Yellow squad", value: "yellow", variant: "success" }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { label: "Core squad", value: "core", variant: "error" }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { label: "Orange squad", value: "orange", variant: "default", disabled: true }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { label: "Purple squad", value: "purple", variant: "default", disabled: true })
  );
};
const TemplateOutlinedElement = (args) => {
  const [currentArgs, updateArgs] = (0, import_manager_api.useArgs)();
  const handleChange = (value) => {
    updateArgs({ currentValue: value });
    currentArgs.onChange(value);
  };
  return /* @__PURE__ */ import_react.default.createElement(
    import_index.default,
    {
      ...args,
      onChange: handleChange,
      containerProps: { flexDirection: "column", rowGap: "20px" }
    },
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { outlined: true, label: "Black squad", value: "black", variant: "main" }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { outlined: true, label: "Yellow squad", value: "yellow", variant: "success" }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.Element, { outlined: true, label: "Core squad", value: "core", variant: "error" })
  );
};
const RadioGroup = TemplateElement.bind({
  currentValue: "purple"
});
const RadioGroupOutlined = TemplateOutlinedElement.bind({});
const TemplateListElement = (args) => {
  const [currentArgs, updateArgs] = (0, import_manager_api.useArgs)();
  const handleChange = (value) => {
    updateArgs({ currentValue: value });
    currentArgs.onChange(value);
  };
  return /* @__PURE__ */ import_react.default.createElement(
    import_index.default,
    {
      ...args,
      onChange: handleChange,
      containerProps: { flexDirection: "column", rowGap: "1rem" }
    },
    /* @__PURE__ */ import_react.default.createElement(
      import_index.default.ListElement,
      {
        label: "Ledger Verse",
        value: "ledgerVerse",
        disabled: true,
        containerProps: { flex: 1 }
      }
    ),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.ListElement, { label: "Live Monad", value: "liveMonad", containerProps: { flex: 1 } }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.ListElement, { label: "Live Hub", value: "liveHub", containerProps: { flex: 1 } }),
    /* @__PURE__ */ import_react.default.createElement(import_index.default.ListElement, { label: "Live Meta", value: "liveMeta", containerProps: { flex: 1 } })
  );
};
const RadioGroupList = TemplateListElement.bind({});
RadioGroup.args = { currentValue: "purple" };
RadioGroupList.args = { currentValue: "liveHub" };
//# sourceMappingURL=Radio.stories.js.map
