"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),r=require("../../utils/index.js"),i=require("../../utils/styles.js");function a(e){return e&&e.__esModule?e:{default:e}}var d=a(t);function s(e){switch(e){case"inverse":return t.css`
        border-color: ${r.transparentizeAliasColor(.35,"contentInverse")};
        border-top-color: ${r.getColorAlias("contentInverse")};
      `;case"secondary":return t.css`
        border-color: ${r.transparentizeAliasColor(.35,"contentInteractiveSecondary")};
        border-top-color: ${r.getColorAlias("contentInteractiveSecondary")};
      `;case"brand":default:return t.css`
        border-color: ${r.transparentizeAliasColor(.35,"contentBrand")};
        border-top-color: ${r.getColorAlias("contentBrand")};
      `}}function c(e){switch(e){case"XS":return{borderSize:2,width:16};case"S":return{borderSize:2.5,width:20};case"L":return{borderSize:4,width:32};case"XL":return{borderSize:6,width:48};case"M":default:return{borderSize:3,width:24}}}const l=d.default.div`
  animation: ${i.spin} 0.8s infinite linear;
  border-radius: ${e=>e.theme.radius.roundedE};
  ${e=>{const{borderSize:o,width:n}=c(e.size);return t.css`
      border: ${o}px solid;
      width: ${n}px;
      height: ${n}px;
      ${s(e.variant)}
    `}};
`;exports.Loader=l;
