'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var styled = require('styled-components');
var utils = require('./utils.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);

const animation = styled.keyframes `
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
`;
const SkeletonBase = styled__default['default'].span `
  ${(props) => utils.getStar(props.variant)}
  ${(props) => {
    var _a;
    return utils.getSkeletonColors(props.variant, (_a = props.color) !== null && _a !== void 0 ? _a : 'skeleton01', 'containerDefault');
}};
  ${(props) => utils.getSkeletonDimensions(props)};
  display: inline-block;
  line-height: 1;
  white-space: pre-wrap;
  animation: ${animation} ease-in-out infinite
    ${(props) => { var _a; return (_a = props.duration) !== null && _a !== void 0 ? _a : 1; }}s;

  ${(props) => utils.getSkeletonRadius(props, props.theme)}
`;

exports.SkeletonBase = SkeletonBase;
