import { createVNode } from 'vue';
import omit from '../_util/omit.mjs';
import { tupleNum } from '../_util/type.mjs';
import warning from '../_util/warning.mjs';
import Base, { baseProps } from './Base.mjs';

const TITLE_ELE_LIST = tupleNum(1, 2, 3, 4, 5);
const titleProps = () => ({
  ...omit(baseProps(), ["component", "strong"]),
  level: Number
});
const Title = (props, {
  slots,
  attrs
}) => {
  const {
    level = 1,
    ...restProps
  } = props;
  let component;
  if (TITLE_ELE_LIST.includes(level)) {
    component = `h${level}`;
  } else {
    warning(false, "Typography", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value.");
    component = "h1";
  }
  const titleProps2 = {
    ...restProps,
    component,
    ...attrs
  };
  return createVNode(Base, titleProps2, slots);
};
Title.displayName = "ATypographyTitle";
Title.inheritAttrs = false;
Title.props = titleProps();

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