import{n as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{t as n}from"./react-C21x__mS.js";import{n as r}from"./iframe-DaN-XFub.js";import{r as i,t as a}from"./DateInput-D8_Oleoy.js";import{n as o,t as s}from"./GridContainer-qDguE1HS.js";import{n as c,t as l}from"./DateRangePresetSelect-Bfx-d5qg.js";var u=t({Default:()=>m,__namedExportsOrder:()=>h,default:()=>p}),d,f,p,m,h;function g(){return(g=e((()=>{d=n(),i(),o(),c(),f=r(),p={title:`Shared/UI/DateRangePresetSelect`,component:l,args:{value:`monthStartToToday`,onChange:()=>{}},parameters:{atomicCanvas:!0,layout:`padded`}},m={render:()=>{let[e,t]=(0,d.useState)(`monthStartToToday`),[n,r]=(0,d.useState)([new Date(2026,2,1,0,0,0),new Date(2026,2,10,23,59,59)]);return(0,f.jsxs)(s,{gap:`md`,children:[(0,f.jsx)(l,{label:`Пресет диапазона`,placeholder:`Выберите пресет`,value:e,onChange:t,onRangeChange:e=>r(e?.range??null),referenceDate:new Date(2026,2,10,12,0,0)}),(0,f.jsx)(a,{label:`Диапазон дат`,placeholder:`дд.мм.гггг - дд.мм.гггг`,value:n,onChange:e=>r(e)})]})}},m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
  render: () => {
    const [presetId, setPresetId] = useState<string | undefined>("monthStartToToday");
    const [range, setRange] = useState<DateRangePresetChangePayload["range"] | null>([new Date(2026, 2, 1, 0, 0, 0), new Date(2026, 2, 10, 23, 59, 59)]);
    return <GridContainer gap="md">
                <DateRangePresetSelect label="Пресет диапазона" placeholder="Выберите пресет" value={presetId} onChange={setPresetId} onRangeChange={payload => setRange(payload?.range ?? null)} referenceDate={new Date(2026, 2, 10, 12, 0, 0)} />

                <RangeDateInput label="Диапазон дат" placeholder="дд.мм.гггг - дд.мм.гггг" value={range} onChange={nextRange => setRange(nextRange)} />
            </GridContainer>;
  }
}`,...m.parameters?.docs?.source},description:{story:`Демонстрирует связку выбора пресета и ручного диапазона дат.`,...m.parameters?.docs?.description}}},h=[`Default`]})))()}export{m as n,g as r,u as t};