import{_ as a,r as t,a2 as e,Z as s,d as l,e as i,h as d,g as r,w as c,bv as o,i as n,an as b,F as u,l as p,a7 as m,am as v,f,al as _,t as g,v as h}from"./index.286e9b79.js";import y from"./widget.6fc36cac.js";import{u as j}from"./tabs.c6f95728.js";import"./image-viewer.b538fe01.js";import"./debounce.caafe00b.js";import"./index.ed3ed02e.js";import"./position.1bd00850.js";import"./scroll.a50153b5.js";import"./http.f588794f.js";const k={key:0,class:"tabs-header-icon"},x={key:1,class:"tabs-header-active"},w={key:2,class:"tabs-header-item"},O=[(a=>(g("data-v-cd806a4b"),a=a(),h(),a))((()=>d("div",{class:"tabs-header-title active"},"选项卡",-1)))],A={class:"tabs-content"},I={class:"tabs-content-item"},W=a({__name:"widget",props:{data:{type:[Object,Array],default:{}}},setup(a){const g=j(),h=a;let W=t(!1),B=t(!1),C=t(0),F=t();e((()=>g.getActive()),(a=>{C.value=a}));const U=s((()=>{(()=>{if(W.value=!1,F.value&&F.value[1]){let a=0;for(let t in F.value){let e=F.value[t];e.offsetWidth&&(a+=e.offsetWidth,a>265&&(W.value=!0))}}})();let a={list_style:h.data.list_style,card_style:h.data.card_style,chamfer_style:h.data.chamfer_style,spacing:h.data.spacing,margin:h.data.margin,padding:h.data.padding,background_color:h.data.background_color,is_title:h.data.is_title,is_price:h.data.is_price,is_button:h.data.is_button};if(h.data.list.length>0){let t=h.data.list[C.value];return Object.assign(t,a),t}let t={type:1,list:[],group:{id:0,name:"",limit:20,link:{}}};return Object.assign(t,a),t}));return(a,t)=>(l(),i("div",{class:"tabs",style:_({backgroundColor:h.data.background_color})},[d("div",{class:m(["tabs-header",{active:r(B)}])},[r(W)?(l(),i("label",k,[c(d("input",{class:"tabs-header-checkbox",type:"checkbox",value:!0,"onUpdate:modelValue":t[0]||(t[0]=a=>n(B)?B.value=a:B=a)},null,512),[[o,r(B)]])])):b("",!0),r(B)?(l(),i("div",x,"分类切换")):b("",!0),(l(!0),i(u,null,p(h.data.list,((a,t)=>(l(),i("label",{ref_for:!0,ref_key:"imgBox",ref:F,class:"tabs-header-item",key:t},[d("div",{class:m(["tabs-header-title",{tabsIndex:r(C)==t}])},v(a.title),3)])))),128)),0===h.data.list.length?(l(),i("label",w,O)):b("",!0)],2),d("div",A,[d("div",I,[f(y,{data:r(U)},null,8,["data"])])])],4))}},[["__scopeId","data-v-cd806a4b"]]);export{W as default};
