'use strict';

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

var _extends = require('@babel/runtime/helpers/extends');
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var React = require('react');
var evokit = require('@prom-ui/core/evokit');

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

function _interopNamespaceCompat(e) {
    if (e && typeof e === 'object' && 'default' in e) return e;
    var n = Object.create(null);
    if (e) {
        Object.keys(e).forEach(function (k) {
            if (k !== 'default') {
                var d = Object.getOwnPropertyDescriptor(e, k);
                Object.defineProperty(n, k, d.get ? d : {
                    enumerable: true,
                    get: function () { return e[k]; }
                });
            }
        });
    }
    n.default = e;
    return Object.freeze(n);
}

var _extends__default = /*#__PURE__*/_interopDefaultCompat(_extends);
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultCompat(_objectWithoutProperties);
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);

var css = {"ek-skeleton":"Skeleton__ek-skeleton___k6rop","ek-skeleton_theme_black-100":"Skeleton__ek-skeleton_theme_black-100___eJWcz","ek-skeleton_theme_white":"Skeleton__ek-skeleton_theme_white___PCwFG","ek-skeleton_variant_text":"Skeleton__ek-skeleton_variant_text___NbT89","ek-skeleton_variant_circle":"Skeleton__ek-skeleton_variant_circle___SlAh0","ek-skeleton_variant_square":"Skeleton__ek-skeleton_variant_square___7p339","ek-skeleton_align_left":"Skeleton__ek-skeleton_align_left___TbAuG","ek-skeleton_align_center":"Skeleton__ek-skeleton_align_center___De09W","ek-skeleton_align_right":"Skeleton__ek-skeleton_align_right___C-QUn","ek-skeleton_opacity_0":"Skeleton__ek-skeleton_opacity_0___BV48x","ek-skeleton_opacity_10":"Skeleton__ek-skeleton_opacity_10___oVBvx","ek-skeleton_opacity_20":"Skeleton__ek-skeleton_opacity_20___F--5F","ek-skeleton_opacity_30":"Skeleton__ek-skeleton_opacity_30___rwtgY","ek-skeleton_opacity_40":"Skeleton__ek-skeleton_opacity_40___iR-d8","ek-skeleton_opacity_50":"Skeleton__ek-skeleton_opacity_50___r6goB","ek-skeleton_opacity_60":"Skeleton__ek-skeleton_opacity_60___-DW2y","ek-skeleton_opacity_70":"Skeleton__ek-skeleton_opacity_70___zqdBc","ek-skeleton_opacity_80":"Skeleton__ek-skeleton_opacity_80___Vc9gU","ek-skeleton_opacity_90":"Skeleton__ek-skeleton_opacity_90___t9rT-","ek-skeleton_opacity_100":"Skeleton__ek-skeleton_opacity_100___lw65w"};

var _excluded = ["align", "height", "opacity", "style", "theme", "variant", "width"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var SkeletonBlock = evokit.createBlock('div', 'skeleton', ['align', 'theme', 'variant', 'opacity'], {
  css: css
});
SkeletonBlock.displayName = 'SkeletonBlock';
var Skeleton = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
  var _ref$align = _ref.align,
    align = _ref$align === void 0 ? 'left' : _ref$align,
    height = _ref.height,
    opacity = _ref.opacity,
    style = _ref.style,
    _ref$theme = _ref.theme,
    theme = _ref$theme === void 0 ? 'black-100' : _ref$theme,
    _ref$variant = _ref.variant,
    variant = _ref$variant === void 0 ? 'text' : _ref$variant,
    width = _ref.width,
    props = _objectWithoutProperties__default.default(_ref, _excluded);
  return /*#__PURE__*/React__namespace.createElement(SkeletonBlock, _extends__default.default({
    "skeleton-align": align,
    "skeleton-theme": theme,
    "skeleton-variant": variant,
    "skeleton-opacity": opacity,
    style: _objectSpread({
      height: height,
      width: width
    }, style),
    "data-qaid": "skeleton",
    "data-testid": "skeleton"
  }, props, {
    ref: ref
  }));
});
Skeleton.displayName = 'Skeleton';

exports.Skeleton = Skeleton;

require('./style.development.v2.css');
