// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

import classNames from 'classnames';
import { normalizeSize } from '../utils';
import { CLS_PREFIX } from '../../constants';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * `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 = `${CLS_PREFIX}skeleton`,
    ...props
  } = _ref;
  const finalStyle = {
    ...style,
    width: normalizeSize(width),
    maxWidth: normalizeSize(maxWidth),
    height: normalizeSize(height)
  };
  return /*#__PURE__*/_jsx(Tag, {
    className: classNames(baseClassName, className),
    style: finalStyle,
    ...props
  });
};
export default Skeleton;