'use strict';

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

var vue = require('vue');
var omit = require('../_util/omit.js');
var type = require('../_util/type.js');
var warning = require('../_util/warning.js');
var Base = require('./Base.js');

const TITLE_ELE_LIST = type.tupleNum(1, 2, 3, 4, 5);
const titleProps = () => ({
  ...omit.default(Base.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.default(false, "Typography", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value.");
    component = "h1";
  }
  const titleProps2 = {
    ...restProps,
    component,
    ...attrs
  };
  return vue.createVNode(Base.default, titleProps2, slots);
};
Title.displayName = "ATypographyTitle";
Title.inheritAttrs = false;
Title.props = titleProps();

exports.default = Title;
exports.titleProps = titleProps;
//# sourceMappingURL=Title.js.map
