import {
  __decorateClass
} from "./chunks/chunk.QU3DSPNU.js";
import { LitElement } from "lit";
import { state } from "lit/decorators.js";
import { DynamicStylesController } from "./utils/controllers/dynamic-styles-controller.js";
import { toPascalCase } from "./utils/helpers/casing.js";
import "reflect-metadata";
class GdsElement extends LitElement {
  constructor() {
    super();
    /**
     * The semantic version of this element. Can be used for troubleshooting to verify the version being used.
     */
    this.semanticVersion = "2.28.2-rc.20260203113139123";
    this._isUsingTransitionalStyles = false;
    this._dynamicStylesController = new DynamicStylesController(this);
  }
  /**
   * Defines the custom element in the custom element registry.
   * This method needs to be called once before the element can be used.
   */
  static define() {
    return void 0;
  }
  connectedCallback() {
    super.connectedCallback();
    this.setAttribute("gds-element", this.gdsElementName?.toString() || "");
  }
  disconnectedCallback() {
    super.disconnectedCallback();
    this.dispatchEvent(
      new CustomEvent("gds-element-disconnected", {
        bubbles: true,
        composed: false
      })
    );
  }
  /**
   * Dispatches a standard event with the given name and options.
   * A pascal cased version of the event name is also dispatched for compatibility.
   */
  dispatchStandardEvent(name, options) {
    const computedOptions = {
      bubbles: true,
      composed: false,
      cancelable: true,
      ...options
    };
    return [
      this.dispatchEvent(new Event(name, computedOptions)),
      this.dispatchEvent(new Event(toPascalCase(name), computedOptions))
    ].every((event) => event !== false);
  }
  /**
   * Dispatches a custom event with the given name and options.
   * A pascal cased version of the event name is also dispatched for compatibility.
   */
  dispatchCustomEvent(name, options = {}) {
    const computedOptions = {
      bubbles: true,
      composed: false,
      cancelable: true,
      ...options
    };
    return [
      this.dispatchEvent(new CustomEvent(name, computedOptions)),
      this.dispatchEvent(new CustomEvent(toPascalCase(name), computedOptions))
    ].every((event) => event !== false);
  }
}
/**
 * Whether the element is defined in the custom element registry.
 */
GdsElement.isDefined = false;
/**
 * Style expression properties for this element will use this selector by default.
 */
GdsElement.styleExpressionBaseSelector = ":host";
__decorateClass([
  state()
], GdsElement.prototype, "_isUsingTransitionalStyles", 2);
export {
  GdsElement
};
