/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import { classes as l } from "@arcgis/toolkit/dom";
import { nothing as m, safeClassMap as g } from "@arcgis/lumina";
import { unsafeStatic as f, html as p } from "lit/static-html.js";
import { g as u } from "./globalCss.js";
function L({ level: n, class: a, id: t, children: o, excludeGlobalCss: s }) {
  const e = r(n), c = `h${e}`, i = f(c);
  return p`<${i} .ariaLevel=${String(e)} class=${g(l(s ? a : u.heading, a))} id=${t ?? m} role=heading>${o}</${i}>`;
}
function h(n, a, t) {
  return Math.min(Math.max(n, a), t);
}
function r(n) {
  return h(Math.ceil(n), 1, 6);
}
function M(n, a = 1) {
  return r(n + a);
}
export {
  L as H,
  M as i
};
