var __decorate = (this && this.__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;
};
import { h } from '@stencil/core';
import { MapToComponentField, VegaSlimmer } from 'vega-slimmer/core';
export 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([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "host", void 0);
__decorate([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "titleText", void 0);
__decorate([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "description", void 0);
__decorate([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "icon", void 0);
__decorate([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "iconAlign", void 0);
__decorate([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "iconColor", void 0);
__decorate([
  MapToComponentField()
], VegaSectionTitleRenderer.prototype, "size", void 0);
