import{computed as h}from"vue";import{isSameDate as s,getQuarter as q}from"../utils/dateUtil.mjs";import{getValue as w}from"../utils/miscUtil.mjs";function E({picker:o,locale:b,selectedValue:i,disabledDate:c,disabled:f,generateConfig:e},D){const l=h(()=>w(i.value,0)),r=h(()=>w(i.value,1));function t(u){return e.value.locale.getWeekFirstDate(b.value.locale,u)}function a(u){const n=e.value.getYear(u),m=e.value.getMonth(u);return n*100+m}function v(u){const n=e.value.getYear(u),m=q(e.value,u);return n*10+m}return[u=>{if(c&&c?.value?.(u))return!0;if(f[1]&&r)return!s(e.value,u,r.value)&&e.value.isAfter(u,r.value);if(D.value[1]&&r.value)switch(o.value){case"quarter":return v(u)>v(r.value);case"month":return a(u)>a(r.value);case"week":return t(u)>t(r.value);default:return!s(e.value,u,r.value)&&e.value.isAfter(u,r.value)}return!1},u=>{if(c.value?.(u))return!0;if(f[0]&&l)return!s(e.value,u,r.value)&&e.value.isAfter(l.value,u);if(D.value[0]&&l.value)switch(o.value){case"quarter":return v(u)<v(l.value);case"month":return a(u)<a(l.value);case"week":return t(u)<t(l.value);default:return!s(e.value,u,l.value)&&e.value.isAfter(l.value,u)}return!1}]}export{E as default};
