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