"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 Drawer_stories_exports = {};
__export(Drawer_stories_exports, {
  Default: () => Default,
  default: () => Drawer_stories_default
});
module.exports = __toCommonJS(Drawer_stories_exports);
var import_react = __toESM(require("react"));
var import_client_api = require("@storybook/client-api");
var import_Button = __toESM(require("../../cta/Button"));
var import_index = __toESM(require("./index"));
var import__ = require("../index");
var Drawer_stories_default = {
  title: "Layout/Drawer",
  component: import_index.default,
  argTypes: {
    isOpen: {
      type: "boolean",
      value: true,
      description: "Is open",
      required: false,
      control: {
        type: "boolean"
      }
    },
    title: {
      type: "text",
      description: "Side default title",
      defaultValue: "Default title",
      control: {
        type: "text"
      },
      required: false
    },
    backgroundColor: {
      control: {
        type: "color",
        presetColors: ["coral", "tomato", "orange", "blue", "purple"]
      }
    },
    big: {
      type: "boolean",
      value: true,
      description: "Larger width side drawer.",
      required: false,
      control: {
        type: "boolean"
      }
    },
    ignoreBackdropClick: {
      type: "boolean",
      value: true,
      description: "Prevent drawer from calling onClose when clicking on the backdrop.",
      required: false,
      control: {
        type: "boolean"
      }
    }
  }
};
const Template = ({ title, big, ignoreBackdropClick, backgroundColor, direction }) => {
  const [{ isOpen }, updateArgs] = (0, import_client_api.useArgs)();
  return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_Button.default, { variant: "main", onClick: () => updateArgs({ isOpen: true }), style: { flex: 1 } }, "Open"), /* @__PURE__ */ import_react.default.createElement(
    import_index.default,
    {
      isOpen,
      onClose: () => updateArgs({ isOpen: false }),
      title,
      big,
      footer: /* @__PURE__ */ import_react.default.createElement(import__.Flex, { flex: 1, justifyContent: "flex-end" }, /* @__PURE__ */ import_react.default.createElement(import_Button.default, { variant: "main", onClick: () => updateArgs({ isOpen: false }) }, "Close")),
      ignoreBackdropClick,
      backgroundColor,
      direction
    },
    /* @__PURE__ */ import_react.default.createElement(import__.Flex, { flexDirection: "column" }, /* @__PURE__ */ import_react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed elit mi, tempus sed justo et, viverra mattis lorem. Praesent odio ligula, facilisis id porttitor tempor, cursus at metus. Etiam consequat ante efficitur sodales iaculis. Aliquam at justo vel erat eleifend semper eu non lorem. Cras porta, dolor a porttitor varius, augue lectus congue lorem, nec lobortis urna ipsum quis lorem. Nam quis auctor lacus. Aenean sit amet dictum purus, at convallis neque. Etiam ac augue non risus luctus laoreet eget a est. Curabitur magna purus, fermentum at eros a, faucibus sollicitudin erat. Proin purus sem, lacinia tincidunt ornare et, sollicitudin nec libero. Quisque lobortis dui ac lacus mollis posuere. Morbi vitae ligula commodo, scelerisque sapien quis, vulputate justo. Cras sagittis, ligula quis mollis porttitor, massa neque faucibus mauris, quis consectetur eros nibh a ante. Quisque ac porttitor ante. Curabitur in neque a nisl aliquet finibus. Mauris in sapien nec odio molestie vulputate. Suspendisse vitae lorem non quam dapibus cursus sit amet a mauris."), /* @__PURE__ */ import_react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed elit mi, tempus sed justo et, viverra mattis lorem. Praesent odio ligula, facilisis id porttitor tempor, cursus at metus. Etiam consequat ante efficitur sodales iaculis. Aliquam at justo vel erat eleifend semper eu non lorem. Cras porta, dolor a porttitor varius, augue lectus congue lorem, nec lobortis urna ipsum quis lorem. Nam quis auctor lacus. Aenean sit amet dictum purus, at convallis neque. Etiam ac augue non risus luctus laoreet eget a est. Curabitur magna purus, fermentum at eros a, faucibus sollicitudin erat. Proin purus sem, lacinia tincidunt ornare et, sollicitudin nec libero. Quisque lobortis dui ac lacus mollis posuere. Morbi vitae ligula commodo, scelerisque sapien quis, vulputate justo. Cras sagittis, ligula quis mollis porttitor, massa neque faucibus mauris, quis consectetur eros nibh a ante. Quisque ac porttitor ante. Curabitur in neque a nisl aliquet finibus. Mauris in sapien nec odio molestie vulputate. Suspendisse vitae lorem non quam dapibus cursus sit amet a mauris."), /* @__PURE__ */ import_react.default.createElement(import__.Flex, null, /* @__PURE__ */ import_react.default.createElement(
      import_Button.default,
      {
        variant: "main",
        onClick: () => updateArgs({ isOpen: false }),
        style: { flex: 1 }
      },
      "Fermer"
    )))
  ));
};
const Default = Template.bind({});
//# sourceMappingURL=Drawer.stories.js.map
