"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("@emotion/css"),c=require("../../utils/cssinjs/index.js"),u={loadingBarAnimateDuration:250};function t(){const a=r.keyframes`
    0% {
      opacity: 0;
    }

    100% {
      opacity: 1;
    }
  `,e=r.keyframes`
    0% {
      opacity: 1;
    }

    100% {
      opacity: 0;
    }
  `;return[a,e]}const i=a=>{const[e,s]=t(),{componentCls:n,loadingBarAnimateDuration:o}=a;return{[n]:{position:"absolute",insetInlineStart:0,width:"100%",zIndex:1,[`${n}__bar`]:{width:"100%",height:"100%",pointerEvents:"none",transition:`background-color ${a.motionDurationMid} ease, transform ${a.motionDurationMid} ease`,willChange:"transform"},"&--default":{[`${a.componentCls}__bar`]:{background:a.colorPrimary}},"&--success":{[`${a.componentCls}__bar`]:{background:a.colorSuccess}},"&--warning":{[`${a.componentCls}__bar`]:{background:a.colorWarn}},"&--error":{[`${a.componentCls}__bar`]:{background:a.colorError}},"&-fade":{"&-enter-active":{animationName:e,animationDuration:`${o}ms`},"&-leave-active":{animationName:s,animationDuration:`${o}ms`}}}}},d=c.genComponentStyleHook("LoadingBar",a=>[i(a)],u,{skipUnit:["loadingBarAnimateDuration"]});exports.default=d;exports.genFadeKeyFrames=t;exports.genLoadingBarStyle=i;
