import{resetComponent as y,textEllipsis as h,resetIcon as v}from"../../style/index.mjs";import"../../theme/internal.mjs";import w from"../../theme/util/genComponentStyleHook.mjs";import{merge as I}from"../../theme/util/statistic.mjs";const T=t=>{const{antCls:e,componentCls:i,listHeight:o,controlHeightLG:n,marginXXS:d,margin:a}=t,r=`${e}-table`,l=`${e}-input`;return{[`${i}-customize-list`]:{[`${i}-list`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:o},[`${r}-wrapper`]:{[`${r}-small`]:{border:0,borderRadius:0,[`${r}-selection-column`]:{width:n,minWidth:n}},[`${r}-pagination${r}-pagination`]:{margin:`${a}px 0 ${d}px`}},[`${l}[disabled]`]:{backgroundColor:"transparent"}}}},f=(t,e)=>{const{componentCls:i,colorBorder:o}=t;return{[`${i}-list`]:{borderColor:e,"&-search:not([disabled])":{borderColor:o}}}},z=t=>{const{componentCls:e}=t;return{[`${e}-status-error`]:{...f(t,t.colorError)},[`${e}-status-warning`]:{...f(t,t.colorWarning)}}},L=t=>{const{componentCls:e,colorBorder:i,colorSplit:o,lineWidth:n,transferItemHeight:d,transferHeaderHeight:a,transferHeaderVerticalPadding:r,transferItemPaddingVertical:l,controlItemBgActive:s,controlItemBgActiveHover:u,colorTextDisabled:g,listHeight:$,listWidth:x,listWidthLG:b,fontSizeIcon:H,marginXS:S,paddingSM:p,lineType:c,iconCls:C,motionDurationSlow:m}=t;return{display:"flex",flexDirection:"column",width:x,height:$,border:`${n}px ${c} ${i}`,borderRadius:t.borderRadiusLG,"&-with-pagination":{width:b,height:"auto"},"&-search":{[`${C}-search`]:{color:g}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${r-n}px ${p}px ${r}px`,color:t.colorText,background:t.colorBgContainer,borderBottom:`${n}px ${c} ${o}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":{...h,flex:"auto",textAlign:"end"},"&-dropdown":{...v(),fontSize:H,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}}},"&-body":{display:"flex",flex:"auto",flexDirection:"column",overflow:"hidden",fontSize:t.fontSize,"&-search-wrapper":{position:"relative",flex:"none",padding:p}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none","&-item":{display:"flex",alignItems:"center",minHeight:d,padding:`${l}px ${p}px`,transition:`all ${m}`,"> *:not(:last-child)":{marginInlineEnd:S},"> *":{flex:"none"},"&-text":{...h,flex:"auto"},"&-remove":{position:"relative",color:i,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:t.colorLinkHover},"&::after":{position:"absolute",insert:`-${l}px -50%`,content:'""'}},[`&:not(${e}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:t.controlItemBgHover,cursor:"pointer"},[`&${e}-list-content-item-checked:hover`]:{backgroundColor:u}},"&-checked":{backgroundColor:s},"&-disabled":{color:g,cursor:"not-allowed"}},[`&-show-remove ${e}-list-content-item:not(${e}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:`${t.paddingXS}px 0`,textAlign:"end",borderTop:`${n}px ${c} ${o}`},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:g,textAlign:"center"},"&-footer":{borderTop:`${n}px ${c} ${o}`},"&-checkbox":{lineHeight:1}}},B=t=>{const{antCls:e,iconCls:i,componentCls:o,transferHeaderHeight:n,marginXS:d,marginXXS:a,fontSizeIcon:r,fontSize:l,lineHeight:s}=t;return{[o]:{...y(t),position:"relative",display:"flex",alignItems:"stretch",[`${o}-disabled`]:{[`${o}-list`]:{background:t.colorBgContainerDisabled}},[`${o}-list`]:L(t),[`${o}-operation`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${d}px`,verticalAlign:"middle",[`${e}-btn`]:{display:"block","&:first-child":{marginBottom:a},[i]:{fontSize:r}}},[`${e}-empty-image`]:{maxHeight:n/2-Math.round(l*s)}}}},W=t=>{const{componentCls:e}=t;return{[`${e}-rtl`]:{direction:"rtl"}}},D=w("Transfer",t=>{const{fontSize:e,lineHeight:i,lineWidth:o,controlHeightLG:n,controlHeight:d}=t,a=Math.round(e*i),r=n,l=d,s=I(t,{transferItemHeight:l,transferHeaderHeight:r,transferHeaderVerticalPadding:Math.ceil((r-o-a)/2),transferItemPaddingVertical:(l-a)/2});return[B(s),T(s),z(s),W(s)]},{listWidth:180,listHeight:200,listWidthLG:250});export{D as default};
