"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../style/index.js"),s=require("../../style/motion/collapse.js");require("../../_util/cssinjs/StyleContext.js");require("vue");require("../../_util/cssinjs/transformers/legacyLogicalProperties.js");const c=require("../../style/motion/zoom.js");require("../../theme/internal.js");const m=require("./explain.js"),p=require("../../theme/util/genComponentStyleHook.js"),d=require("../../theme/util/statistic.js"),g=i=>({legend:{display:"block",width:"100%",marginBottom:i.marginLG,padding:0,color:i.colorTextDescription,fontSize:i.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${i.lineWidth}px ${i.lineType} ${i.colorBorder}`},label:{fontSize:i.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${i.controlOutlineWidth}px ${i.controlOutline}`},output:{display:"block",paddingTop:15,color:i.colorText,fontSize:i.fontSize,lineHeight:i.lineHeight}}),t=(i,l)=>{const{formItemCls:e}=i;return{[e]:{[`${e}-label > label`]:{height:l},[`${e}-control-input`]:{minHeight:l}}}},u=i=>{const{componentCls:l}=i;return{[i.componentCls]:{...a.resetComponent(i),...g(i),[`${l}-text`]:{display:"inline-block",paddingInlineEnd:i.paddingSM},"&-small":{...t(i,i.controlHeightSM)},"&-large":{...t(i,i.controlHeightLG)}}}},f=i=>{const{formItemCls:l,iconCls:e,componentCls:o,rootPrefixCls:n}=i;return{[l]:{...a.resetComponent(i),marginBottom:i.marginLG,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
        &-hidden.${n}-row`]:{display:"none"},"&-has-warning":{[`${l}-split`]:{color:i.colorError}},"&-has-error":{[`${l}-split`]:{color:i.colorWarning}},[`${l}-label`]:{display:"inline-block",flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${i.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:i.controlHeight,color:i.colorTextHeading,fontSize:i.fontSize,[`> ${e}`]:{fontSize:i.fontSize,verticalAlign:"top"},[`&${l}-required:not(${l}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:i.marginXXS,color:i.colorError,fontSize:i.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${o}-hide-required-mark &`]:{display:"none"}},[`${l}-optional`]:{display:"inline-block",marginInlineStart:i.marginXXS,color:i.colorTextDescription,[`${o}-hide-required-mark &`]:{display:"none"}},[`${l}-tooltip`]:{color:i.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:i.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:i.marginXXS/2,marginInlineEnd:i.marginXS},[`&${l}-no-colon::after`]:{content:'" "'}}},[`${l}-control`]:{display:"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${n}-col-'"]):not([class*="' ${n}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:i.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[l]:{"&-explain, &-extra":{clear:"both",color:i.colorTextDescription,fontSize:i.fontSize,lineHeight:i.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:i.controlHeightSM,transition:`color ${i.motionDurationMid} ${i.motionEaseOut}`},"&-explain":{"&-error":{color:i.colorError},"&-warning":{color:i.colorWarning}}},[`&-with-help ${l}-explain`]:{height:"auto",opacity:1},[`${l}-feedback-icon`]:{fontSize:i.fontSize,textAlign:"center",visibility:"visible",animationName:c.zoomIn,animationDuration:i.motionDurationMid,animationTimingFunction:i.motionEaseOutBack,pointerEvents:"none","&-success":{color:i.colorSuccess},"&-error":{color:i.colorError},"&-warning":{color:i.colorWarning},"&-validating":{color:i.colorPrimary}}}}},h=i=>{const{componentCls:l,formItemCls:e,rootPrefixCls:o}=i;return{[`${l}-horizontal`]:{[`${e}-label`]:{flexGrow:0},[`${e}-control`]:{flex:"1 1 0",minWidth:0},[`${e}-label.${o}-col-24 + ${e}-control`]:{minWidth:"unset"}}}},$=i=>{const{componentCls:l,formItemCls:e}=i;return{[`${l}-inline`]:{display:"flex",flexWrap:"wrap",[e]:{flex:"none",flexWrap:"nowrap",marginInlineEnd:i.margin,marginBottom:0,"&-with-help":{marginBottom:i.marginLG},[`> ${e}-label,
        > ${e}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${e}-label`]:{flex:"none"},[`${l}-text`]:{display:"inline-block"},[`${e}-has-feedback`]:{display:"inline-block"}}}}},r=i=>({margin:0,padding:`0 0 ${i.paddingXS}px`,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{display:"none"}}}),x=i=>{const{componentCls:l,formItemCls:e}=i;return{[`${e} ${e}-label`]:r(i),[l]:{[e]:{flexWrap:"wrap",[`${e}-label,
          ${e}-control`]:{flex:"0 0 100%",maxWidth:"100%"}}}}},b=i=>{const{componentCls:l,formItemCls:e,rootPrefixCls:o}=i;return{[`${l}-vertical`]:{[e]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${l}-item-control`]:{width:"100%"}}},[`${l}-vertical ${e}-label,
      .${o}-col-24${e}-label,
      .${o}-col-xl-24${e}-label`]:r(i),[`@media (max-width: ${i.screenXSMax}px)`]:[x(i),{[l]:{[`.${o}-col-xs-24${e}-label`]:r(i)}}],[`@media (max-width: ${i.screenSMMax}px)`]:{[l]:{[`.${o}-col-sm-24${e}-label`]:r(i)}},[`@media (max-width: ${i.screenMDMax}px)`]:{[l]:{[`.${o}-col-md-24${e}-label`]:r(i)}},[`@media (max-width: ${i.screenLGMax}px)`]:{[l]:{[`.${o}-col-lg-24${e}-label`]:r(i)}}}},S=p.default("Form",(i,{rootPrefixCls:l})=>{const e=d.merge(i,{formItemCls:`${i.componentCls}-item`,rootPrefixCls:l});return[u(e),f(e),m.default(e),h(e),$(e),b(e),s.default(e),c.zoomIn]});exports.default=S;
