"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../../utils/cssinjs/index.js"),t=()=>({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),l=e=>({position:"absolute",zIndex:1,display:"none",background:e.colorPrimary,opacity:.2,transition:"none",pointerEvents:"none"}),o=e=>{const{componentCls:r,namespace:s}=e,a=`--${s}-splitter-bar-preview-offset`,i=`${r}-bar`;return{[r]:{boxSizing:"border-box",margin:0,padding:0,color:e.textColor1,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:"inherit",display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`${r}-bar`]:{flex:"none",position:"relative",userSelect:"none",[`${r}-bar-dragger`]:{zIndex:1,...t(e),"&::before":{content:'""',background:"rgba(0, 0, 0, 0.04)",...t(e)},"&::after":{content:'""',background:"rgba(0, 0, 0, 0.15)",...t(e)},[`&:hover:not(${r}-bar-dragger-active)`]:{"&::before":{background:"#e6f4ff"}},"&-active":{zIndex:2,"&::before":{background:"#bae0ff"}},[`&-active${i}-dragger-customize`]:{[`${i}-dragger-icon`]:{color:e.colorPrimary}},[`&-disabled${r}-bar-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:"rgba(0,0,0,0.04)"}},"&::after":{display:"none"}},"&-customize":{[`${i}-dragger-icon`]:{...t(e),display:"flex",alignItems:"center",color:e.antdv.colorFill},"&::after":{display:"none"}}},[`${r}-bar-collapse-bar`]:{...t(e),zIndex:1e3,background:"rgba(0,0,0,0.04)",fontSize:e.fontSizeSM,borderRadius:e.calc(e.borderRadius).div(2).equal(),color:e.textColor1,cursor:"pointer",opacity:0,display:"flex",justifyContent:"center",alignItems:"center",[`&:hover:not(${i}-collapse-bar-customize)`]:{background:e.antdv.controlItemBgActive},[`&:active:not(${i}-collapse-bar-customize)`]:{background:e.antdv.controlItemBgActiveHover},[`${i}-collapse-icon`]:{display:"flex",alignItems:"center"}},[`${i}-collapse-bar-customize`]:{background:"transparent"},"&:hover, &:active":{[`${r}-bar-collapse-bar-hover-only`]:{opacity:1}},[`${r}-bar-collapse-bar-hover-only`]:{"@media(hover:none)":{opacity:1}},[`${r}-bar-collapse-bar-always-hidden`]:{display:"none"},[`${r}-bar-collapse-bar-always-visible`]:{opacity:1}},[`${r}-mask`]:{position:"fixed",zIndex:1e3,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`& > ${r}-bar`]:{width:0,[`${r}-bar-preview`]:{height:"100%",width:e.splitterBarSize,...l(e),"&-active":{display:"block",transform:`translateX(var(${a}))`}},[`${r}-bar-dragger`]:{cursor:"col-resize",height:"100%",width:e.splitterTriggerSize,"&::before":{height:"100%",width:e.splitterBarSize},"&::after":{height:e.splitterSplitBarDraggableSize,width:e.splitterBarSize}},[`${r}-bar-collapse-bar`]:{width:e.fontSizeSM,height:"24px","&-start":{left:"auto",right:e.calc(e.splitterTriggerSize).div(2).equal(),transform:"translateY(-50%)"},"&-end":{left:e.calc(e.splitterTriggerSize).div(2).equal(),right:"auto",transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`& > ${r}-bar`]:{height:0,[`${r}-bar-preview`]:{height:e.splitterBarSize,width:"100%",...l(e),[`&${r}-bar-preview-active`]:{display:"block",transform:`translateY(var(${a}))`}},[`${r}-bar-dragger`]:{cursor:"row-resize",width:"100%",height:e.splitterTriggerSize,"&::before":{width:"100%",height:e.splitterBarSize},"&::after":{width:e.splitterSplitBarDraggableSize,height:e.splitterBarSize}},[`${r}-bar-collapse-bar`]:{height:e.fontSizeSM,width:"24px","&-start":{top:"auto",bottom:e.calc(e.splitterTriggerSize).div(2).equal(),transform:"translateX(-50%)"},"&-end":{top:e.calc(e.splitterTriggerSize).div(2).equal(),bottom:"auto",transform:"translateX(-50%)"}}}},[`${r}-panel`]:{overflow:"auto",padding:"0 1px",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{padding:0,overflow:"hidden"},[`&:has(${r}:only-child)`]:{overflow:"hidden"}}}}},c=n.genComponentStyleHook("Splitter",e=>[o(e)],{splitterBarSize:2,splitterTriggerSize:6,splitterSplitBarDraggableSize:20});exports.default=c;exports.genSplitterStyle=o;
