"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _utils = require("../utils");
var _constants = require("../../constants");
var _jsxRuntime = require("react/jsx-runtime");
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

/**
 * `Skeleton` (or content-placeholder) is placeholder preview of content before the data gets loaded to reduce load-time frustration.
 * Skeleton is used for non-text components, images, media-objects, etc.
 * @since 3.28.0
 */
const Skeleton = _ref => {
  let {
    width,
    maxWidth,
    height,
    style,
    component: Tag = 'span',
    className,
    baseClassName = `${_constants.CLS_PREFIX}skeleton`,
    ...props
  } = _ref;
  const finalStyle = {
    ...style,
    width: (0, _utils.normalizeSize)(width),
    maxWidth: (0, _utils.normalizeSize)(maxWidth),
    height: (0, _utils.normalizeSize)(height)
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, {
    className: (0, _classnames.default)(baseClassName, className),
    style: finalStyle,
    ...props
  });
};
var _default = exports.default = Skeleton;