import{b as Q,r as m,ac as y,i as b,o as l,f as r,w as s,d,x as k,y as x,m as p,a2 as i,F as g,p as B,e as P,q as S,t as w,E as q,bD as H,H as N}from"./index-CS0Lg7FU.js";import{Q as $,a as j,b as z}from"./QTabPanels-ClCtC6_m.js";import{Q as D}from"./QTabs-B-o_fdzI.js";import{_ as A}from"./_plugin-vue_export-helper-BrVfw-gY.js";const E={class:"task-deail-container"},F={__name:"cTab",props:{hideBackButton:{type:Boolean,default:!1},modelValue:{type:String,required:!0},type:{type:String,default:"line"},tabBarStyle:{type:Object,default:()=>({})},tabPosition:{type:String,default:"top"},tabBarGutter:{type:Number,default:0},data:{type:Array,required:!0,default:()=>[]},useTranslation:{type:Boolean,default:!0},showHeight:{type:Boolean,default:!1}},emits:["update:modelValue","change","tabClick"],setup(e,{emit:V}){const h=Q();let u=e;const c=V,v={top:"justify",bottom:"left",left:"left",right:"left"},o=m(u.modelValue),f=m([...u.data]);y(()=>u.modelValue,t=>{o.value=t}),y(()=>u.data,t=>{f.value=[...t]},{deep:!0});const T=t=>{c("update:modelValue",t),c("change",t),c("tabClick",t)},C=()=>{h.go(-1)};return(t,n)=>(l(),b("div",E,[r(q,{class:i(e.hideBackButton?"taskdetail-toolbar-nobtn":"taskdetail-toolbar")},{default:s(()=>[e.hideBackButton?k("",!0):(l(),d(x,{key:0,size:"12px",flat:"",onClick:C},{default:s(()=>[r(p,{class:"iconfont caxa-back"})]),_:1})),r(D,{modelValue:o.value,"onUpdate:modelValue":[n[0]||(n[0]=a=>o.value=a),n[1]||(n[1]=a=>T(o.value))],class:i(["taskdetail-toolbar-tabs",e.type==="card"?"taskinfo-cardtabs":"task-tabs",e.tabPosition==="left"?"left-align":""]),align:v[e.tabPosition]||"left",breakpoint:0},{default:s(()=>[(l(!0),b(g,null,B(f.value,a=>(l(),d($,{key:a.key,name:a.key,class:i(e.type==="card"?"taskinfo-cardtabs-item":"")},{default:s(()=>[a.icon?(l(),d(p,{key:0,name:a.icon,class:"q-mr-xs"},null,8,["name"])):k("",!0),P("span",{style:S({marginRight:a.icon?"22px":""})},w(e.useTranslation?t.$t(a.header||a.title):a.header||a.title),5)]),_:2},1032,["name","class"]))),128))]),_:1},8,["modelValue","class","align"])]),_:1},8,["class"]),r(N,{class:"taskdetail-container"},{default:s(()=>[r(j,{modelValue:o.value,"onUpdate:modelValue":n[2]||(n[2]=a=>o.value=a),animated:"",class:i([e.type=="card"?"taskinfo-content":"dynamic-body",e.showHeight?"bomViewHeight":""])},{default:s(()=>[(l(!0),b(g,null,B(f.value,a=>(l(),d(z,{key:`${a.key}`,name:a.key,class:"jobcontent-panel"},{default:s(()=>[H(t.$slots,a.key,{class:"tab-content"},void 0,!0)]),_:2},1032,["name"]))),128))]),_:3},8,["modelValue","class"])]),_:3})]))}},K=A(F,[["__scopeId","data-v-86f27aef"]]);export{K as C};
