import{j as t,at as n,an as c,a6 as d,bj as h,aj as m,W as i}from"./vendor-mui-core-CnXrAOs3.js";function p({variant:e="success",title:o="",subTitle:a="",footer:s=null,...l}){let r;switch(e){case"error":r=m;break;case"info":r=h;break;case"loading":r=d;break;default:r=c}return t.jsx(u,{variant:e,...l,children:t.jsxs("div",{className:"result-body",children:[t.jsx("span",{className:`result-icon color-${e}`,children:t.jsx(r,{})}),t.jsx("div",{className:`result-title color-${e} ${o?"":"ele-hide"}`,children:o}),t.jsx("div",{className:`result-sub-title ${a?"":"ele-hide"}`,children:a}),s&&t.jsx("div",{className:"result-footer",children:s})]})})}p.propTypes={variant:i.oneOf(["success","error","info","loading"]),title:i.string,subTitle:i.any,footer:i.any};const u=n.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;

  .result-body {
    padding: 0 14px;
    max-width: 500px;
    text-align: center;
    margin-top: -64px;
  }

  .result-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 100%;
    color: ${e=>e.theme.palette.common.white};
    transition: all ease 0.3s;
    &.color-success {
      background-color: ${e=>e.theme.palette.success.main};
    }
    &.color-error {
      background-color: ${e=>e.theme.palette.error.main};
    }
    &.color-info {
      background-color: ${e=>e.theme.palette.primary.main};
    }
  }

  .result-title {
    height: 34px;
    font-size: 21px;
    margin-bottom: 8px;
    font-weight: bolder;
    transition: all ease 0.3s;
    transition-delay: 0.2s;
    &.color-success {
      color: ${e=>e.theme.palette.success.main};
    }
    &.color-error {
      color: ${e=>e.theme.palette.error.main};
    }
    &.color-info {
      color: ${e=>e.theme.palette.primary.main};
    }
    &.ele-hide {
      height: 0;
      opacity: 0;
      margin-bottom: 0;
    }
  }

  .result-sub-title {
    margin: 0 auto;
    min-height: 17px;
    color: ${e=>e.theme.palette.grey[700]};
    font-size: 14px;
    line-height: 1.21em; // 0.01可以解决视网膜屏轻微偏移问题
    transition: all ease 0.3s;
    transition-delay: 0.2s;
    word-break: break-word;
    &.ele-hide {
      line-height: 0;
      opacity: 0;
      min-height: 0;
    }
  }

  .result-footer {
    padding-top: 24px;
    transition: all ease 0.3s;
    transition-delay: 0.2s;
  }
`;export{p as u};
