import{u as d}from"./EmbedPopup-D-ZgVQoP.js";import{e as r}from"./vendor-vue-runtime-core-DwK6Ry68.js";const a={idx:0,title:"Total",alias:"default_total",pageId:"",sectionId:""};function x(){const i=d(),s=r(()=>{const e=i.getTotalElements;return e.length>0?e:[a]}),n=r(()=>i.getTotalElements.length===0);return{totalFields:s,isDefaultFormula:n,syncFormulas:e=>{const l=s.value;if(n.value)return[{idx:a.idx,title:a.title,alias:a.alias}];const o=e.map(t=>l.find(u=>u.alias===t.alias)).filter(Boolean);return o.length>0?o.map(t=>({idx:t.idx,title:t.title,alias:t.alias})):[{idx:l[0].idx,title:l[0].title,alias:l[0].alias}]}}}export{x as u};
//# sourceMappingURL=useCommonSettings-CchmNYtf.js.map
