import{p as P}from"./configs-B15JgQZ-.js";import{e as h,f as t,F as R,u as M,g as u,p,c as v,o as n,t as x,B as _,v as T}from"./iframe-Bl-fVlm8.js";import{P as F}from"./PzDate-BGdKm7KY.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const k=["startDate","endDate"],H={key:0,class:"pz-date-range__separator","aria-hidden":"true"},V={key:1,class:"pz-date-range__label"},l=h({name:"PzDateRange",__name:"PzDateRange",props:{date:{},itemClass:{default:""},format:{default:"DD MM YYYY HH:mm"},hideRangeText:{type:Boolean,default:!1},mode:{default:"default"},translateFn:{type:Function,default:e=>e},typography:{}},setup(e){const z=e,m=v(()=>k.reduce((r,d)=>{const a=z.date[d];return a&&r.push({key:d,value:a,index:r.length}),r},[]));return(r,d)=>m.value.length?(n(),t("span",{key:0,class:u(["pz-date-range",[`pz-date-range--${e.mode}`,e.typography?`pz-typography--${e.typography}`:null]])},[(n(!0),t(R,null,M(m.value,a=>(n(),t("span",{key:a.key,class:u(["pz-date-range__item",e.itemClass])},[a.index>0?(n(),t("span",H)):p("",!0),e.hideRangeText?p("",!0):(n(),t("span",V,x(e.translateFn(a.key)),1)),_(T(F),{date:a.value,format:e.format},null,8,["date","format"])],2))),128))],2)):p("",!0)}}),b=O(l,[["__scopeId","data-v-2256e8e4"]]);l.__docgenInfo=Object.assign({displayName:l.name??l.__name},{name:"PzDateRange",exportName:"default",displayName:"PzDateRange",description:"",tags:{},props:[{name:"date",required:!0,type:{name:"PzDateRangeValue"}},{name:"itemClass",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"format",required:!1,type:{name:"PzDateFormat"},defaultValue:{func:!1,value:'"DD MM YYYY HH:mm"'}},{name:"hideRangeText",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"mode",required:!1,type:{name:"PzDateRangeMode"},defaultValue:{func:!1,value:'"default"'}},{name:"translateFn",required:!1,type:{name:"PzDateRangeTranslateFn"},defaultValue:{func:!1,value:"(key: PzDateRangeKey) => key"}},{name:"typography",required:!1,type:{name:"PzTextVariant"}}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Display/PzDateRange/PzDateRange.vue"]});const Y={startDate:"2026-05-06T15:37:37.682718+03:00",endDate:"2026-05-12T11:10:00+03:00"},N=["YYYY","MM YYYY","DD MM YYYY","DD MM YYYY HH:mm","DD MM YYYY HH:mm:ss"],S=["default","new-line"],C=e=>({startDate:"від",endDate:"до"})[e],K={title:"Components/Display/PzDateRange",component:b,parameters:{docs:{description:{component:"Renders start and end dates through `PzDate`, keeping the default presentation as plain body text. Empty range edges are skipped."}}},args:{date:Y,format:"DD MM YYYY HH:mm",hideRangeText:!1,mode:"new-line",translateFn:C,typography:void 0},argTypes:{format:{control:"select",options:N},hideRangeText:{control:"boolean"},itemClass:{control:"text"},mode:{control:"radio",options:S},translateFn:{table:{disable:!0}},typography:{control:"select",options:[void 0,...P],description:"Overrides typography using a PzText variant."}}},s={args:{}},o={args:{date:{startDate:Y.startDate}}};var c,i,g;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`{
  args: {}
}`,...(g=(i=s.parameters)==null?void 0:i.docs)==null?void 0:g.source}}};var f,y,D;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:`{
  args: {
    date: {
      startDate: SAMPLE_RANGE.startDate
    }
  }
}`,...(D=(y=o.parameters)==null?void 0:y.docs)==null?void 0:D.source}}};const L=["Playground","StartOnly"];export{s as Playground,o as StartOnly,L as __namedExportsOrder,K as default};
