import { r as registerInstance, h, H as Host } from './index-416188d1.js';

const RuxDatetime = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.date = new Date();
    this.locale = 'default';
    this.weekday = undefined;
    this.era = undefined;
    this.year = undefined;
    this.month = undefined;
    this.day = undefined;
    this.hour = undefined;
    this.minute = undefined;
    this.second = undefined;
    this.timeZoneName = undefined;
    this.timeZone = undefined;
    this.hour12 = false;
  }
  render() {
    const date = new Date(this.date);
    const { day, era, hour, hour12, locale, minute, month, second, timeZone, timeZoneName, weekday, year, } = this;
    // try catch here and throw a console error for now
    return new Intl.DateTimeFormat(locale, {
      day,
      era,
      hour,
      hour12,
      minute,
      month,
      second,
      timeZone,
      timeZoneName,
      weekday,
      year,
    }).format(date);
  }
};

const ruxTableCss = ":host{display:table;width:100%;border-collapse:separate;border-spacing:0;color:var(--color-text-primary, #ffffff);border-bottom:1px solid var(--color-background-base-default, #101923);background:var(--color-background-surface-default, #1b2d3e);text-align:left;overflow:scroll}:host([hidden]){display:none}";

const RuxTable = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    return (h(Host, null, h("slot", null)));
  }
};
RuxTable.style = ruxTableCss;

const ruxTableBodyCss = ":host{display:table-row-group}:host([hidden]){display:none}";

const RuxTableBody = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    return (h(Host, null, h("slot", null)));
  }
};
RuxTableBody.style = ruxTableBodyCss;

const ruxTableCellCss = ":host{display:table-cell;vertical-align:middle;border-width:0 0 1px 0;border-style:solid;border-color:var(--color-background-base-default, #101923);font-family:var(--font-body-1-font-family, 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif);font-size:var(--font-body-1-font-size, 1rem);font-weight:var(--font-body-1-font-weight, 400);letter-spacing:var(--font-body-1-letter-spacing, 0.005em);line-height:var(--font-body-1-line-height, calc(24 / 16));padding:var(--spacing-0, 0rem) var(--spacing-2, 0.5rem);height:calc(var(--spacing-8, 2rem) - 1px);white-space:nowrap}::slotted(*){vertical-align:middle}:host([hidden]){display:none}";

const RuxTableCell = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    return (h(Host, null, h("slot", null)));
  }
};
RuxTableCell.style = ruxTableCellCss;

const ruxTableHeaderCss = ":host{display:table-header-group;box-shadow:0 0.25rem 0.5rem rgba(0, 0, 0, 0.45);border-top-width:1px;border-top-style:solid;border-top-color:var(--color-background-surface-default, #1b2d3e)}:host([hidden]){display:none}";

const RuxTableHeader = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    return (h(Host, null, h("slot", null)));
  }
};
RuxTableHeader.style = ruxTableHeaderCss;

const ruxTableHeaderCellCss = ":host{display:table-cell;vertical-align:middle;background:var(--color-background-surface-header, #172635);color:var(--color-text-primary, #ffffff);font-family:var(--font-heading-5-font-family, 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif);font-size:var(--font-heading-5-font-size, 1.125rem);font-weight:var(--font-heading-5-font-weight, 400);letter-spacing:var(--font-heading-5-letter-spacing, 0em);line-height:var(--font-heading-5-line-height, calc(24 / 18));padding:var(--spacing-0, 0rem) var(--spacing-2, 0.5rem);height:var(--spacing-10, 2.5rem);white-space:nowrap}:host([hidden]){display:none}";

const RuxTableHeaderCell = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    return (h(Host, null, h("slot", null)));
  }
};
RuxTableHeaderCell.style = ruxTableHeaderCellCss;

const ruxTableHeaderRowCss = ":host{display:table-row}:host([hidden]){display:none}";

const RuxTableHeaderRow = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    return (h(Host, null, h("slot", null)));
  }
};
RuxTableHeaderRow.style = ruxTableHeaderRowCss;

const ruxTableRowCss = ":host{display:table-row}:host([hidden]){display:none}:host(.is-selected){background:var(--color-background-surface-selected, #1c3f5e)}:host(.is-selected) ::slotted(rux-table-cell){border-color:var(--color-background-base-default, #101923)}:host(:hover:not(.is-selected)){background:var(--color-background-surface-hover, #1c3851);color:var(--color-text-primary, #ffffff)}";

const RuxTableRow = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.selected = false;
  }
  render() {
    return (h(Host, { class: {
        'is-selected': this.selected,
      } }, h("slot", null)));
  }
};
RuxTableRow.style = ruxTableRowCss;

export { RuxDatetime as rux_datetime, RuxTable as rux_table, RuxTableBody as rux_table_body, RuxTableCell as rux_table_cell, RuxTableHeader as rux_table_header, RuxTableHeaderCell as rux_table_header_cell, RuxTableHeaderRow as rux_table_header_row, RuxTableRow as rux_table_row };
