import { h, r as registerInstance, H as Host, g as getElement } from './index-090d31ca.js';
import { s as sanitizeVegaComponent } from './component-7d906393.js';
import { c as MapToComponentField, V as VegaSlimmer, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-46020a03.js';

var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
class VegaSectionTitleRenderer extends VegaSlimmer {
  render() {
    return (h("vega-flex", { "align-items": "start", "justify-content": "start", gap: "size-8", class: this.size === 'small' ? 'section-title-small' : undefined },
      this.renderPrefixIcon(),
      this.renderText()));
  }
  renderPrefixIcon() {
    return (this.icon &&
      this.iconAlign === 'left' && h("div", { class: "section-title-icon-container" }, this.renderIcon()));
  }
  renderText() {
    return (h("vega-flex", { class: "vega-flex-grow", direction: "col", "align-items": "start", "justify-content": "start", gap: "size-4" },
      this.renderTitle(),
      this.renderDescription()));
  }
  renderTitle() {
    return (h("div", { class: "section-title-text vega-flex-grow" },
      h("span", null, this.titleText),
      this.renderSuffixIcon()));
  }
  renderDescription() {
    return h("div", { class: "section-title-description" }, this.description);
  }
  renderSuffixIcon() {
    return (this.icon &&
      this.iconAlign === 'right' && h("div", { class: "right-icon-container" }, this.renderIcon()));
  }
  renderIcon() {
    return (h("vega-icon", { icon: this.icon, color: this.iconColor, size: this.size === 'small' ? 'size-16' : 'size-20', class: "vega-flex-shrink-0" }));
  }
}
__decorate$1([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "host", void 0);
__decorate$1([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "titleText", void 0);
__decorate$1([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "description", void 0);
__decorate$1([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "icon", void 0);
__decorate$1([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "iconAlign", void 0);
__decorate$1([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "iconColor", void 0);
__decorate$1([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "size", void 0);

const vegaSectionTitleCss = ":host{display:block}.section-title-text{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:\"Inter\", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.section-title-text{font-family:\"Inter\", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.section-title-text{font-family:\"Inter\", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.section-title-text{font-family:\"Inter\", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}.section-title-description{font-family:\"Inter\", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.section-title-description{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.section-title-description{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.section-title-description{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.section-title-icon-container{margin-top:4px}.right-icon-container{display:inline-block;margin-left:8px;margin-top:4px;vertical-align:middle}.section-title-small .section-title-text{font-family:\"Inter\", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.section-title-small .section-title-text{font-family:\"Inter\", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.section-title-small .section-title-text{font-family:\"Inter\", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.section-title-small .section-title-text{font-family:\"Inter\", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}";

var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
    r = Reflect.decorate(decorators, target, key, desc);
  else
    for (var i = decorators.length - 1; i >= 0; i--)
      if (d = decorators[i])
        r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
const VegaSectionTitle = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.globalSlimmers = {};
    this.renderer = new VegaSectionTitleRenderer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    /**
     * Specifies the text content of the title displayed
     *    within the section title.
     *
     * @vegaVersion 2.1.0
     */
    this.titleText = '';
    /**
     * Specifies the alignment of the icon relative to
     *    the title within the section title.
     *
     * @vegaVersion 2.1.0
     */
    this.iconAlign = 'left';
    /**
     * Specifies the color of the icon displayed
     *    within the section title.
     * @vegaVersion 2.81.0
     */
    this.iconColor = 'text-primary';
    /**
     * Specifies the size of the section title.
     *
     * @vegaVersion 2.81.0
     */
    this.size = 'default';
  }
  render() {
    return sanitizeVegaComponent(h(Host, null, this.renderer.render()), this.host);
  }
  get host() { return getElement(this); }
};
__decorate([
  InjectVegaGlobalSlimmer()
], VegaSectionTitle.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSectionTitle.prototype, "renderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSectionTitle.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
VegaSectionTitle.style = vegaSectionTitleCss;

export { VegaSectionTitle as vega_section_title };
