import { yupResolver } from "@hookform/resolvers/yup";
import { useForm } from "react-hook-form";
import { object, string } from "yup";
import { RenderStage } from "../storybook-utils.mjs";
import { FormSelect } from "./FormSelect.mjs";
import { FormProvider } from "./context.mjs";
import { jsx, jsxs } from "react/jsx-runtime";
var FormSelect_stories_default = {
  component: FormSelect,
  decorators: []
};
const options = [{
    label: "Option A",
    value: "A"
  }, {
    label: "Option B",
    value: "B"
  }],
  Variants = () => {
    const formMethods = useForm({
      resolver: yupResolver(schema)
    });
    return /* @__PURE__ */jsx(FormProvider, {
      formMethods,
      submitHandler: () => {},
      children: /* @__PURE__ */jsxs(RenderStage, {
        children: [/* @__PURE__ */jsx(FormSelect, {
          id: "property",
          label: "Standard",
          options,
          supportingText: "Standard select"
        }), /* @__PURE__ */jsx(FormSelect, {
          id: "property",
          label: "Loading",
          options,
          loading: !0,
          supportingText: "Loading state"
        }), /* @__PURE__ */jsx(FormSelect, {
          id: "property",
          label: "Error",
          options,
          error: !0,
          supportingText: "Error state"
        }), /* @__PURE__ */jsx(FormSelect, {
          id: "property",
          label: "Disabled",
          options,
          disabled: !0,
          supportingText: "Disabled state"
        })]
      })
    });
  },
  schema = object({
    property: string().required()
  });
export { Variants, FormSelect_stories_default as default };
//# sourceMappingURL=FormSelect.stories.mjs.map
