import { createVNode } from 'vue';
import '../../../utils/index.mjs';
import ATypographyBase from './Base.mjs';
import { TITLE_ELE_LIST, titleProps } from './props.mjs';
import { devWarning } from '../../../utils/log.mjs';

const Title = (props, {
  slots,
  attrs
}) => {
  const {
    level = 1,
    ...restProps
  } = props;
  let component;
  if (TITLE_ELE_LIST.includes(level)) {
    component = `h${level}`;
  } else {
    devWarning(false, "Typography", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value.");
    component = "h1";
  }
  const getTitleProps = {
    ...restProps,
    component,
    ...attrs
  };
  return createVNode(ATypographyBase, getTitleProps, slots);
};
Title.displayName = "ATypographyTitle";
Title.inheritAttrs = false;
Title.props = titleProps();

export { Title as default };
//# sourceMappingURL=Title.mjs.map
