import{j as t,r as n}from"./iframe-p4aYZyoq.js";import{d as x}from"./index-BUaT88Mv.js";import{S as d}from"./sliding-panel-Cb4AJULw.js";import{B as w}from"./button-BsNF7f-b.js";import"./preload-helper-BDBacUwf.js";import"./index-CLmSyVZI.js";import"./index-BNdLPu6u.js";import"./index-Dx18ixSn.js";import"./timing-functions.es-CZdVE6Va.js";import"./times-DeY5Bu0x.js";const{fn:_}=__STORYBOOK_MODULE_TEST__,P=({title:s,position:e,size:u,onClose:i})=>{const[f,a]=n.useState(!1),[g,h]=n.useState(),S=n.useCallback(r=>{if(r){const l=r.getBoundingClientRect();h(l.x+l.width/2)}},[e]);return t.jsxs(t.Fragment,{children:[t.jsx(w,{onClick:()=>{a(!0)},style:{position:"absolute",top:"1rem",left:e==="left"?"1rem":"",right:e==="right"?"1rem":""},ref:S,children:"Click me"}),f&&t.jsx(d,{title:s,position:e,size:u,onClose:r=>{a(!1),i==null||i(r)},arrowX:g,pathname:"#",children:x.loremIpsum({count:25})})]})},W={title:"Layout/Sliding Panel",component:d,argTypes:{size:{control:"select",options:["small","medium","large","full-screen"]},position:{control:"select",options:["right","left"]}},args:{title:"Title",size:"medium",position:"left",onClose:_()},render:s=>t.jsx(P,{...s})},o={};var m,c,p;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:"{}",...(p=(c=o.parameters)==null?void 0:c.docs)==null?void 0:p.source}}};const z=["SlidingPanelWithArrow"];export{o as SlidingPanelWithArrow,z as __namedExportsOrder,W as default};
