import{a as e,c as t,i as n}from"./preload-helper-B45gAKPr.js";import{pn as r,t as i}from"./iframe-GmIo3IOR.js";import{t as a}from"./DateInput-CvJvdtwa.js";import{c as o}from"./preset-select-DSUOhzZJ.js";import{i as s}from"./Grid-DhASlspp.js";import{t as c}from"./grid-CXx-3eN4.js";import{n as l,t as u}from"./DateRangePresetSelect-CPZ6FKGz.js";var d=e({Default:()=>h,__namedExportsOrder:()=>g,default:()=>m}),f,p,m,h,g,_=n((()=>{f=t(r(),1),o(),c(),l(),p=i(),m={title:`Shared/UI/DateRangePresetSelect`,component:u,args:{value:`monthStartToToday`,onChange:()=>{}},parameters:{atomicCanvas:!0,layout:`padded`}},h={render:()=>{let[e,t]=(0,f.useState)(`monthStartToToday`),[n,r]=(0,f.useState)([new Date(2026,2,1,0,0,0),new Date(2026,2,10,23,59,59)]);return(0,p.jsxs)(s,{gap:`md`,children:[(0,p.jsx)(u,{label:`Пресет диапазона`,placeholder:`Выберите пресет`,value:e,onChange:t,onRangeChange:e=>r(e?.range??null),referenceDate:new Date(2026,2,10,12,0,0)}),(0,p.jsx)(a,{label:`Диапазон дат`,placeholder:`дд.мм.гггг - дд.мм.гггг`,value:n,onChange:e=>r(e)})]})}},h.parameters={...h.parameters,docs:{...h.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>;
  }
}`,...h.parameters?.docs?.source},description:{story:`Демонстрирует связку выбора пресета и ручного диапазона дат.`,...h.parameters?.docs?.description}}},g=[`Default`]}));_();export{h as Default,g as __namedExportsOrder,m as default,_ as n,d as t};