const e=require("../../style/index.js"),t=require("../../theme/util/genComponentStyleHook.js"),n=require("../../theme/util/statistic.js"),r=require("../../input/style/index.js");var i=e=>{let{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}},"&:focus-visible":{cursor:`not-allowed`,[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`}}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`&${t}-mini`]:{[`
          &:hover ${t}-item:not(${t}-item-active),
          &:active ${t}-item:not(${t}-item-active),
          &:hover ${t}-item-link,
          &:active ${t}-item-link
        `]:{backgroundColor:`transparent`}},[`${t}-item`]:{cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},a:{color:e.colorTextDisabled,backgroundColor:`transparent`,border:`none`,cursor:`not-allowed`},"&-active":{borderColor:e.colorBorder,backgroundColor:e.paginationItemDisabledBgActive,"&:hover, &:active":{backgroundColor:e.paginationItemDisabledBgActive},a:{color:e.paginationItemDisabledColorActive}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover, &:active":{backgroundColor:`transparent`},[`${t}-simple&`]:{backgroundColor:`transparent`,"&:hover, &:active":{backgroundColor:`transparent`}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}},[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{[`&${t}-disabled ${t}-item-link`]:{"&:hover, &:active":{backgroundColor:`transparent`}}}}}},a=e=>{let{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`},[`&${t}-mini ${t}-item`]:{minWidth:e.paginationItemSizeSM,height:e.paginationItemSizeSM,margin:0,lineHeight:`${e.paginationItemSizeSM-2}px`},[`&${t}-mini ${t}-item:not(${t}-item-active)`]:{backgroundColor:`transparent`,borderColor:`transparent`,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.paginationItemSizeSM,height:e.paginationItemSizeSM,margin:0,lineHeight:`${e.paginationItemSizeSM}px`,[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:`transparent`}},[`
    &${t}-mini ${t}-prev ${t}-item-link,
    &${t}-mini ${t}-next ${t}-item-link
    `]:{backgroundColor:`transparent`,borderColor:`transparent`,"&::after":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.paginationItemSizeSM,marginInlineEnd:0,lineHeight:`${e.paginationItemSizeSM}px`},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.paginationMiniOptionsSizeChangerTop},"&-quick-jumper":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`,input:{...r.genInputSmallStyle(e),width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM}}}}},o=e=>{let{componentCls:t}=e;return{[`
    &${t}-simple ${t}-prev,
    &${t}-simple ${t}-next
    `]:{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`,verticalAlign:`top`,[`${t}-item-link`]:{height:e.paginationItemSizeSM,backgroundColor:`transparent`,border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`}}},[`&${t}-simple ${t}-simple-pager`]:{display:`inline-block`,height:e.paginationItemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:`border-box`,height:`100%`,marginInlineEnd:e.marginXS,padding:`0 ${e.paginationItemPaddingInline}px`,textAlign:`center`,backgroundColor:e.paginationItemInputBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:`none`,transition:`border-color ${e.motionDurationMid}`,color:`inherit`,"&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:`not-allowed`}}}}},s=t=>{let{componentCls:n}=t;return{[`${n}-jump-prev, ${n}-jump-next`]:{outline:0,[`${n}-item-container`]:{position:`relative`,[`${n}-item-link-icon`]:{color:t.colorPrimary,fontSize:t.fontSizeSM,opacity:0,transition:`all ${t.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:`auto`}},[`${n}-item-ellipsis`]:{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:`block`,margin:`auto`,color:t.colorTextDisabled,fontFamily:`Arial, Helvetica, sans-serif`,letterSpacing:t.paginationEllipsisLetterSpacing,textAlign:`center`,textIndent:t.paginationEllipsisTextIndent,opacity:1,transition:`all ${t.motionDurationMid}`}},"&:hover":{[`${n}-item-link-icon`]:{opacity:1},[`${n}-item-ellipsis`]:{opacity:0}},"&:focus-visible":{[`${n}-item-link-icon`]:{opacity:1},[`${n}-item-ellipsis`]:{opacity:0},...e.genFocusOutline(t)}},[`
    ${n}-prev,
    ${n}-jump-prev,
    ${n}-jump-next
    `]:{marginInlineEnd:t.marginXS},[`
    ${n}-prev,
    ${n}-next,
    ${n}-jump-prev,
    ${n}-jump-next
    `]:{display:`inline-block`,minWidth:t.paginationItemSize,height:t.paginationItemSize,color:t.colorText,fontFamily:t.paginationFontFamily,lineHeight:`${t.paginationItemSize}px`,textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,borderRadius:t.borderRadius,cursor:`pointer`,transition:`all ${t.motionDurationMid}`},[`${n}-prev, ${n}-next`]:{fontFamily:`Arial, Helvetica, sans-serif`,outline:0,button:{color:t.colorText,cursor:`pointer`,userSelect:`none`},[`${n}-item-link`]:{display:`block`,width:`100%`,height:`100%`,padding:0,fontSize:t.fontSizeSM,textAlign:`center`,backgroundColor:`transparent`,border:`${t.lineWidth}px ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:`none`,transition:`all ${t.motionDurationMid}`},[`&:focus-visible ${n}-item-link`]:{...e.genFocusOutline(t)},[`&:hover ${n}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${n}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${n}-disabled:hover`]:{[`${n}-item-link`]:{backgroundColor:`transparent`}}},[`${n}-slash`]:{marginInlineEnd:t.paginationSlashMarginInlineEnd,marginInlineStart:t.paginationSlashMarginInlineStart},[`${n}-options`]:{display:`inline-block`,marginInlineStart:t.margin,verticalAlign:`middle`,"&-size-changer.-select":{display:`inline-block`,width:`auto`},"&-quick-jumper":{display:`inline-block`,height:t.controlHeight,marginInlineStart:t.marginXS,lineHeight:`${t.controlHeight}px`,verticalAlign:`top`,input:{...r.genBasicInputStyle(t),width:t.controlHeightLG*1.25,height:t.controlHeight,boxSizing:`border-box`,margin:0,marginInlineStart:t.marginXS,marginInlineEnd:t.marginXS}}}}},c=t=>{let{componentCls:n}=t;return{[`${n}-item`]:{display:`inline-block`,minWidth:t.paginationItemSize,height:t.paginationItemSize,marginInlineEnd:t.marginXS,fontFamily:t.paginationFontFamily,lineHeight:`${t.paginationItemSize-2}px`,textAlign:`center`,verticalAlign:`middle`,listStyle:`none`,backgroundColor:`transparent`,border:`${t.lineWidth}px ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:0,cursor:`pointer`,userSelect:`none`,a:{display:`block`,padding:`0 ${t.paginationItemPaddingInline}px`,color:t.colorText,transition:`none`,"&:hover":{textDecoration:`none`}},[`&:not(${n}-item-active)`]:{"&:hover":{transition:`all ${t.motionDurationMid}`,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},...e.genFocusStyle(t),"&-active":{fontWeight:t.paginationFontWeightActive,backgroundColor:t.paginationItemBgActive,borderColor:t.colorPrimary,a:{color:t.colorPrimary},"&:hover":{borderColor:t.colorPrimaryHover},"&:hover a":{color:t.colorPrimaryHover}}}}},l=t=>{let{componentCls:n}=t;return{[n]:{...e.resetComponent(t),"ul, ol":{margin:0,padding:0,listStyle:`none`},"&::after":{display:`block`,clear:`both`,height:0,overflow:`hidden`,visibility:`hidden`,content:`""`},[`${n}-total-text`]:{display:`inline-block`,height:t.paginationItemSize,marginInlineEnd:t.marginXS,lineHeight:`${t.paginationItemSize-2}px`,verticalAlign:`middle`},...c(t),...s(t),...o(t),...a(t),...i(t),[`@media only screen and (max-width: ${t.screenLG}px)`]:{[`${n}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:`none`}}},[`@media only screen and (max-width: ${t.screenSM}px)`]:{[`${n}-options`]:{display:`none`}}},[`&${t.componentCls}-rtl`]:{direction:`rtl`}}},u=e=>{let{componentCls:t}=e;return{[`${t}${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.paginationItemDisabledBgActive}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[t]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.paginationItemBg},[`${t}-item-link`]:{backgroundColor:e.paginationItemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.paginationItemBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},d=t.default(`Pagination`,e=>{let t=n.merge(e,{paginationItemSize:e.controlHeight,paginationFontFamily:e.fontFamily,paginationItemBg:e.colorBgContainer,paginationItemBgActive:e.colorBgContainer,paginationFontWeightActive:e.fontWeightStrong,paginationItemSizeSM:e.controlHeightSM,paginationItemInputBg:e.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:e.controlItemBgActiveDisabled,paginationItemDisabledColorActive:e.colorTextDisabled,paginationItemLinkBg:e.colorBgContainer,inputOutlineOffset:`0 0`,paginationMiniOptionsMarginInlineStart:e.marginXXS/2,paginationMiniQuickJumperInputWidth:e.controlHeightLG*1.1,paginationItemPaddingInline:e.marginXXS*1.5,paginationEllipsisLetterSpacing:e.marginXXS/2,paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:`0.13em`},r.initInputToken(e));return[l(t),e.wireframe&&u(t)]});exports.default=d;