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 { Component, Element, Host, Prop, State, h } from '@stencil/core';
import { sanitizeVegaComponent } from '../../utils/component';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from 'vega-slimmer/core';
import { VegaDividerSizeController } from './slimmers/controllers/vega-divider-size-controller';
import { formatAndValidResponsiveToken } from '../../utils/design-token';
import ResponsiveFormatFacade from '../../helpers/formatter/responsive-map-formatter/responsive-format-facade';
import { PageResizeObserverSlimmer } from '../../helpers/slimmers/page-resize-observer-slimmer';
import { getCurrentBreakpoint } from '../../utils/breakpoints';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
/**
 * @vegaVersion 2.10.0
 */
export class VegaDivider {
  constructor() {
    this.globalSlimmers = {};
    this.pageResizeObserverSlimmer = new PageResizeObserverSlimmer();
    this.sizeController = new VegaDividerSizeController();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.currentBreakpoint = getCurrentBreakpoint();
    /**
     * Specifies the direction of the divider.
     *
     * It can be set to either horizontal or vertical,
     *    determining the orientation of the separation.
     *
     * @vegaVersion 2.10.0
     */
    this.direction = 'horizontal';
    /**
     * Determines the rendering style for the divider.
     *
     * @vegaVersion 2.10.0
     */
    this.variant = 'primary';
    /**
     * Specifies the margin within the divider,
     *    offering flexibility in adjusting spacing.
     * It can be set as ResponsiveType or any sizing token
     *    for precise control over layout and appearance.
     *
     * @vegaVersion 2.10.0
     */
    this.margin = '0';
  }
  render() {
    return sanitizeVegaComponent(h(Host, { class: {
        [`vega-divider-${ResponsiveFormatFacade.formatCustom(this.direction)}`]: true,
        [`vega-divider-${this.variant}`]: true,
        [formatAndValidResponsiveToken(this.margin, 'margin')]: true,
      }, style: this.sizeController.getSize() }), this.host);
  }
  static get is() { return "vega-divider"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["./vega-divider.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-divider.css"]
  }; }
  static get properties() { return {
    "direction": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "ResponsiveType<VegaDividerDirectionType>",
        "resolved": "\"horizontal\" | \"vertical\" | { S?: VegaDividerDirectionType; M?: VegaDividerDirectionType; L?: VegaDividerDirectionType; XL?: VegaDividerDirectionType; default?: VegaDividerDirectionType; }",
        "references": {
          "ResponsiveType": {
            "location": "import",
            "path": "../../types/ui.type"
          },
          "VegaDividerDirectionType": {
            "location": "import",
            "path": "./interface"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.10.0"
          }],
        "text": "Specifies the direction of the divider.\n\nIt can be set to either horizontal or vertical,\n   determining the orientation of the separation."
      },
      "attribute": "direction",
      "reflect": false,
      "defaultValue": "'horizontal'"
    },
    "variant": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "VegaDividerVariantType",
        "resolved": "\"primary\" | \"secondary\"",
        "references": {
          "VegaDividerVariantType": {
            "location": "import",
            "path": "./interface"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.10.0"
          }],
        "text": "Determines the rendering style for the divider."
      },
      "attribute": "variant",
      "reflect": false,
      "defaultValue": "'primary'"
    },
    "margin": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "ResponsiveType<MarginType>",
        "resolved": "\"0\" | \"auto\" | \"size-112\" | \"size-12\" | \"size-16\" | \"size-2\" | \"size-20\" | \"size-24\" | \"size-32\" | \"size-4\" | \"size-40\" | \"size-48\" | \"size-64\" | \"size-72\" | \"size-8\" | \"size-80\" | { S?: MarginType; M?: MarginType; L?: MarginType; XL?: MarginType; default?: MarginType; } | { left?: MarginValueType; right?: MarginValueType; top?: MarginValueType; bottom?: MarginValueType; x?: MarginValueType; y?: MarginValueType; }",
        "references": {
          "ResponsiveType": {
            "location": "import",
            "path": "../../types/ui.type"
          },
          "MarginType": {
            "location": "import",
            "path": "../../types/ui.type"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.10.0"
          }],
        "text": "Specifies the margin within the divider,\n   offering flexibility in adjusting spacing.\nIt can be set as ResponsiveType or any sizing token\n   for precise control over layout and appearance."
      },
      "attribute": "margin",
      "reflect": false,
      "defaultValue": "'0'"
    }
  }; }
  static get states() { return {
    "currentBreakpoint": {}
  }; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaDivider.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaDivider.prototype, "pageResizeObserverSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaDivider.prototype, "sizeController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaDivider.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
