import{resetComponent as k,clearFix as A}from"../../style/index.mjs";import"../../theme/internal.mjs";import I from"./bordered.mjs";import P from"./ellipsis.mjs";import W from"./empty.mjs";import E from"./expand.mjs";import D from"./filter.mjs";import M from"./fixed.mjs";import V from"./pagination.mjs";import L from"./radius.mjs";import G from"./resize.mjs";import X from"./rtl.mjs";import Y from"./selection.mjs";import j from"./size.mjs";import q from"./sorter.mjs";import J from"./sticky.mjs";import T from"./summary.mjs";import K from"../../theme/util/genComponentStyleHook.mjs";import{merge as N}from"../../theme/util/statistic.mjs";import{TinyColor as g}from"../../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.mjs";const O=l=>{const{componentCls:o,fontWeightStrong:x,tablePaddingVertical:i,tablePaddingHorizontal:e,lineWidth:$,lineType:p,tableBorderColor:c,tableFontSize:m,tableBg:b,tableRadius:d,tableHeaderTextColor:B,motionDurationMid:a,tableHeaderBg:y,tableHeaderCellSplitColor:u,tableRowHoverBg:S,tableSelectedRowBg:r,tableSelectedRowHoverBg:f,tableFooterTextColor:s,tableFooterBg:H,paddingContentVerticalLG:w}=l,n=`${$}px ${p} ${c}`;return{[`${o}-wrapper`]:{clear:"both",maxWidth:"100%",...A(),[o]:{...k(l),fontSize:m,background:b,borderRadius:`${d}px ${d}px 0 0`},table:{width:"100%",textAlign:"start",borderRadius:`${d}px ${d}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
          ${o}-thead > tr > th,
          ${o}-tbody > tr > td,
          tfoot > tr > th,
          tfoot > tr > td
        `]:{position:"relative",padding:`${w}px ${e}px`,overflowWrap:"break-word"},[`${o}-title`]:{padding:`${i}px ${e}px`},[`${o}-thead`]:{"\n          > tr > th,\n          > tr > td\n        ":{position:"relative",color:B,fontWeight:x,textAlign:"start",background:y,borderBottom:n,transition:`background ${a} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${o}-selection-column):not(${o}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:u,transform:"translateY(-50%)",transition:`background-color ${a}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${o}:not(${o}-bordered)`]:{[`${o}-tbody`]:{"> tr":{"> td":{borderTop:n,borderBottom:"transparent"},"&:last-child > td":{borderBottom:n},[`&:first-child > td,
              &${o}-measure-row + tr > td`]:{borderTop:"none",borderTopColor:"transparent"}}}},[`${o}${o}-bordered`]:{[`${o}-tbody`]:{"> tr":{"> td":{borderBottom:n}}}},[`${o}-tbody`]:{"> tr":{"> td":{transition:`background ${a}, border-color ${a}`,[`
              > ${o}-wrapper:only-child,
              > ${o}-expanded-row-fixed > ${o}-wrapper:only-child
            `]:{[o]:{marginBlock:`-${i}px`,marginInline:`${l.tableExpandColumnWidth-e}px -${e}px`,[`${o}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},[`
            &${o}-row:hover > td,
            > td${o}-cell-row-hover
          `]:{background:S},[`&${o}-row-selected`]:{"> td":{background:r},"&:hover > td":{background:f}}}},[`${o}-footer`]:{padding:`${i}px ${e}px`,color:s,background:H}}}},xo=K("Table",l=>{const{controlItemBgActive:o,controlItemBgActiveHover:x,colorTextPlaceholder:i,colorTextHeading:e,colorSplit:$,colorBorderSecondary:p,fontSize:c,padding:m,paddingXS:b,paddingSM:d,controlHeight:B,colorFillAlter:a,colorIcon:y,colorIconHover:u,opacityLoading:S,colorBgContainer:r,borderRadiusLG:f,colorFillContent:s,colorFillSecondary:H,controlInteractiveSize:w}=l,n=new g(y),C=new g(u),z=o,F=2,v=new g(H).onBackground(r).toHexString(),R=new g(s).onBackground(r).toHexString(),h=new g(a).onBackground(r).toHexString(),t=N(l,{tableFontSize:c,tableBg:r,tableRadius:f,tablePaddingVertical:m,tablePaddingHorizontal:m,tablePaddingVerticalMiddle:d,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:b,tablePaddingHorizontalSmall:b,tableBorderColor:p,tableHeaderTextColor:e,tableHeaderBg:h,tableFooterTextColor:e,tableFooterBg:h,tableHeaderCellSplitColor:p,tableHeaderSortBg:v,tableHeaderSortHoverBg:R,tableHeaderIconColor:n.clone().setAlpha(n.getAlpha()*S).toRgbString(),tableHeaderIconColorHover:C.clone().setAlpha(C.getAlpha()*S).toRgbString(),tableBodySortBg:h,tableFixedHeaderSortActiveBg:v,tableHeaderFilterActiveBg:s,tableFilterDropdownBg:r,tableRowHoverBg:h,tableSelectedRowBg:z,tableSelectedRowHoverBg:x,zIndexTableFixed:F,zIndexTableSticky:F+1,tableFontSizeMiddle:c,tableFontSizeSmall:c,tableSelectionColumnWidth:B,tableExpandIconBg:r,tableExpandColumnWidth:w+2*l.padding,tableExpandedRowBg:a,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:i,tableScrollThumbBgHover:e,tableScrollBg:$});return[O(t),V(t),T(t),q(t),D(t),I(t),L(t),E(t),T(t),W(t),Y(t),M(t),J(t),P(t),j(t),G(t),X(t)]});export{xo as default};
