import{d as V,bk as I,V as z,r as m,d9 as $,c as _,o as p,W as A,w as n,j as l,i as f,k as P,l as a,ds as T,B as W,p as c,A as t,ee as j,aE as H,D as K,e1 as R,E as U,hX as X,ae as q,O as x,v as F}from"./index-9PRMimni.js";import{_ as G}from"./VirtualList-CyTw9HCK.js";const J={class:"h-[calc(100vh-160px)]"},M=V({__name:"CrewList",props:{crewList:{},loading:{type:Boolean}},emits:["reload","selectCrewItem"],setup(Q,{expose:v,emit:w}){const u=w,d=I(),{t:i}=z(),g=m(),r=m();function h(s,o){g.value=o,u("selectCrewItem",{item:s,index:o}),console.log("crewList",s,o)}function C(){if(r.value)return r.value}return v({getSerachParams:C}),(s,o)=>{const k=P,L=W,N=j,b=x,y=q,S=X,B=R,D=G,O=A,E=$("loading");return p(),_(O,{"content-class":"p-3",class:"w-1/4 mr-2"},{default:n(()=>[l(N,null,{default:n(()=>[l(k,{value:a(r),"onUpdate:value":o[0]||(o[0]=e=>T(r)?r.value=e:null),clearable:"",class:"w-full"},null,8,["value"]),l(L,{type:"primary",onClick:o[1]||(o[1]=e=>u("reload")),loading:s.loading},{default:n(()=>[c(t(a(i)("operation.crewSettings.search")),1)]),_:1},8,["loading"])]),_:1}),f("div",J,[s.crewList&&s.crewList.length>0&&!s.loading?H((p(),_(D,{key:0,items:s.crewList,"item-size":42},{default:n(({item:e})=>[(p(),_(B,{key:e.id,class:U(["border-b last:border-none p-4 cursor-pointer hover:bg-[#effdd9] w-full",{"bg-[#caf982]":a(g)==e.id}]),"description-class":"w-[70%]",onClick:Y=>h(e,e.id)},{avatar:n(()=>[l(b,{round:"",size:"large",src:e.seafarerHeadimgAddress},null,8,["src"])]),header:n(()=>[c(t(a(d).getLocale==="en"?e.crewNameEn:e.crewName),1)]),"header-extra":n(()=>[l(y,{bordered:!1,type:"info"},{default:n(()=>[c(t(a(d).getLocale==="en"?e.rankNameEn:e.rankName),1)]),_:2},1024)]),description:n(()=>[l(S,{class:"w-full","line-clamp":1},{tooltip:n(()=>[c(t(a(i)("operation.crewSettings.singOn"))+"："+t(e.signOnDate),1)]),default:n(()=>[f("div",null,t(a(i)("operation.crewSettings.singOn"))+"："+t(e.signOnDate),1)]),_:2},1024)]),_:2},1032,["class","onClick"]))]),_:1},8,["items"])),[[E,s.loading]]):K("",!0)])]),_:1})}}}),ne=F(M,[["__scopeId","data-v-853109f3"]]);export{ne as default};
