import{computed as f}from"vue";import p from"../../_util/hooks/useMemo.mjs";import x from"../../_util/shallowequal.mjs";import{formatValue as V}from"../utils/dateUtil.mjs";function d(u,{formatList:o,generateConfig:s,locale:n}){const r=p(()=>{if(!u.value)return[[""],""];let e="";const t=[];for(let l=0;l<o.value.length;l+=1){const i=o.value[l],a=V(u.value,{generateConfig:s.value,locale:n.value,format:i});t.push(a),l===0&&(e=a)}return[t,e]},[u,o],(e,t)=>t[0]!==e[0]||!x(t[1],e[1])),m=f(()=>r.value[0]),c=f(()=>r.value[1]);return[m,c]}export{d as default};
