import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';

const scFormRowCss = ".form-row{display:flex;align-items:flex-start;justify-content:space-between;gap:calc(var(--sc-form-row-spacing, 0.75em) * 2.5)}::slotted(*){flex:1;width:0}";

const ScFormRow$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
  }
  componentDidLoad() {
    if ('ResizeObserver' in window) {
      this.observer = new window.ResizeObserver(entries => {
        this.width = entries === null || entries === void 0 ? void 0 : entries[0].contentRect.width;
      });
      this.observer.observe(this.el);
    }
  }
  render() {
    return (h("div", { part: "base", class: {
        'form-row': true,
        'breakpoint-sm': this.width < 384,
        'breakpoint-md': this.width >= 384 && this.width < 576,
        'breakpoint-lg': this.width >= 576 && this.width < 768,
        'breakpoint-xl': this.width >= 768,
      } }, h("slot", null)));
  }
  get el() { return this; }
  static get style() { return scFormRowCss; }
}, [1, "sc-form-row", {
    "width": [32]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sc-form-row"];
  components.forEach(tagName => { switch (tagName) {
    case "sc-form-row":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, ScFormRow$1);
      }
      break;
  } });
}
defineCustomElement$1();

const ScFormRow = ScFormRow$1;
const defineCustomElement = defineCustomElement$1;

export { ScFormRow, defineCustomElement };
