import{d as E,aS as O,a4 as p,V as F,bj as G,fY as K,r as d,f as Y,l,aw as H,g as R,h as J,o as Q,i as b,E as f,j as o,w as i,N as U,z as X,db as Z,aG as ee,v as te}from"./index-9PRMimni.js";import{D as se}from"./vuedraggable.umd-Co2xEC3p.js";import{e as ae}from"./element-resize-detector-D6t9qRKJ.js";import{_ as ne}from"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import{aj as oe}from"./template-rpthWlT9.js";import"./index-kKnqLkWM.js";const ce={class:"tabs-view-main"},le=E({__name:"index",props:{collapsed:{type:Boolean}},emits:["pageFullScreen","changeTab"],setup(x,{emit:I}){O(e=>({"306e102a":L.value}));const y=x,S=I,{t:r}=F(),{getNavMode:_,getNavWidth:w,getNavMinWidth:W,getBorderRadius:k}=G(),C=K(),a=d(null),g=d(null),h=d("basicInfo"),u=d(!1),M=p(()=>{const e=C.isMixMenu,t=Y(),s=l(_);return l(s)!="horizontal-mix"?!0:!(l(s)==="horizontal-mix"&&e&&t.meta.isRoot)}),N=p(()=>{const{collapsed:e}=y,t=l(_),s=W.value,n=w.value;return{left:t==="horizontal"||!M.value?"0px":e?`${s}px`:`${n}px`,width:"calc(100%)"}}),z=d([]),V=p(()=>[{label:r("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabBasicInfo"),value:"basicInfo",compPage:"basicInfo"},{label:r("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabCauseAnalysis"),value:"causeAnalysis",compPage:"causeAnalysis"},{label:r("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabAction"),value:"action",compPage:"action"},{label:r("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabReferences"),value:"references",compPage:"references"},{label:r("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.rabAttachments"),value:"attachments",compPage:"attachments"}]),L=p(()=>`${k.value}px`);function m(e,t){const s=a.value.scrollLeft,n=t>0&&s+t>=e||t<0&&s+t<=e?e:s+t;if(a.value&&a.value.scrollTo(n,0),n!==e)return window.requestAnimationFrame(()=>m(e,t))}function P(){const e=a.value.offsetWidth,t=a.value.scrollLeft;if(!t)return;const s=t>e?t-e:0;m(s,(s-t)/20)}function $(){const e=a.value.offsetWidth,t=a.value.scrollWidth,s=a.value.scrollLeft;if(t-s/2<=e)return;const n=t-s>e*2?s+e:t-e;m(n,(n-s)/20)}function q(e){if(!a.value)return;const t=a.value.offsetWidth,s=a.value.scrollWidth;t<s?(u.value=!0,[...a.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(c=>{c.id===`tag${h.value}`&&c.scrollIntoView&&c.scrollIntoView()})):u.value=!1}function A(){q()}function B(e){h.value=e.value,S("changeTab",e)}H(async()=>{j(),z.value=await oe()});function j(){let e;e=ae(),e.listenTo(g.value,A)}return(e,t)=>{const s=R("LeftOutlined"),n=U,c=X,T=R("RightOutlined");return Q(),J("div",{style:ee(N.value),class:f(["tabs-view tabs-view-border-radius tabs-view-dark-background",{"tabs-view-default-background":!0,"tabs-view-dark-background":!1}])},[b("div",ce,[b("div",{ref_key:"navWrap",ref:g,class:f([{"tabs-card-scrollable":u.value},"tabs-card"])},[o(c,{tag:"span",class:f([{"tabs-card-prev-hide":!u.value},"tabs-card-prev"]),onClick:P},{default:i(()=>[o(n,{size:"16"},{default:i(()=>[o(s)]),_:1})]),_:1},8,["class"]),o(c,{tag:"span",class:f([{"tabs-card-next-hide":!u.value},"tabs-card-next"]),onClick:$},{default:i(()=>[o(n,{size:"16"},{default:i(()=>[o(T)]),_:1})]),_:1},8,["class"]),b("div",{ref_key:"navScroll",ref:a,class:"tabs-card-scroll"},[o(l(se),{list:V.value,animation:"300",class:"flex","item-key":"value",draggable:!1},{item:i(({element:v,index:D})=>[o(c,{tag:"div",id:`tag${v.value}`,class:f([{"active-item":h.value===v.value},"shadow-sm tabs-card-scroll-item"]),onClick:Z(ie=>B(v),["stop"])},{default:i(()=>[o(l(ne),{ref:`renderDom_${D}`,value:v.label},null,8,["value"])]),_:2},1032,["id","class","onClick"])]),_:1},8,["list"])],512)],2)])],4)}}}),he=te(le,[["__scopeId","data-v-6d214aa9"]]);export{he as default};
