'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-1141a245.js');
const nested = require('./nested-d75d7d5f.js');
const i18n = require('./i18n-a565202d.js');
const actionUtil = require('./action-util-7006ea09.js');
const dataModel = require('./data-model-01c368bc.js');
const field = require('./field-2133746c.js');
require('./BaseField-381327a9.js');

const dvnCheckboxCss = ":host{display:block}:host(.inline){display:inline-block;margin-right:calc(4 * var(--spacing-unit))}label{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;vertical-align:top;display:block}label:hover:not(.disabled) .input:checked~.check-mark{-webkit-box-shadow:0 0 5px var(--base-color);box-shadow:0 0 5px var(--base-color);border-color:var(--base-color-light);background:var(--base-color-light)}label:hover:not(.disabled) .input:not(:checked)~.check-mark{border-color:var(--base-color)}label.disabled{cursor:default;color:var(--color-disabled)}label.leaned{margin:0}label.small{padding:4px 4px 4px 22px}label.medium{padding:6px 6px 6px 28px}label.large{padding:8px 8px 8px 34px}label.neutral{--base-color:var(--color-neutral);--base-color-light:var(--color-neutral-light)}label.primary{--base-color:var(--color-primary);--base-color-light:var(--color-primary-light)}label.secondary{--base-color:var(--color-secondary);--base-color-light:var(--color-secondary-light)}label.warning{--base-color:var(--color-warning);--base-color-light:var(--color-warning-light)}label.danger{--base-color:var(--color-danger);--base-color-light:var(--color-danger-light)}label.small .check-mark{height:14px;width:14px;left:4px}label.medium .check-mark{height:16px;width:16px;left:6px}label.large .check-mark{height:18px;width:18px;left:8px}label.leaned .check-mark{left:0}input{opacity:0;position:absolute;cursor:pointer;margin:0}input:disabled{cursor:no-drop}input:checked:not(:disabled)~.check-mark{border-color:var(--base-color);background:var(--base-color)}input:checked:disabled~.check-mark{border-color:var(--color-disabled);background:var(--color-disabled)}input:checked~.check-mark:after{display:block}input:focus:not(.disabled)~.check-mark{-webkit-box-shadow:0 0 5px var(--base-color);box-shadow:0 0 5px var(--base-color);border-color:var(--base-color)}.check-mark{top:0;bottom:0;margin:auto;position:absolute;border-radius:3px;-webkit-transition:all .3s;transition:all .3s;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid var(--color-border);background-color:var(--color-input-background)}.check-mark:after{content:\"\";position:absolute;display:none;left:0;top:35%;bottom:50%;right:0;margin:auto;width:10px;height:6px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;box-sizing:border-box;border-color:var(--color-background-secondary);border-style:solid;border-width:0px 0px 3px 3px}";

const DvnCheckbox = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.change = index.createEvent(this, "change", 7);
    this.scale = 'medium';
    this.tint = 'primary';
    this.disabled = false;
    this.checked = false;
    this.inline = false;
    this.leaned = false;
  }
  render() {
    return (index.h(index.Host, { class: {
        inline: this.inline,
      } }, index.h("label", { class: {
        disabled: this.disabled,
        [this.scale]: true,
        [this.tint]: true,
        leaned: this.leaned,
      } }, this.label, index.h("slot", { name: "label" }), index.h("input", { ref: (el) => this.checkboxInput = el, class: "input", type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: (e) => {
        this.change.emit(this.checkboxInput.checked);
        e.stopPropagation();
      } }), index.h("span", { class: "check-mark" }))));
  }
};
DvnCheckbox.style = dvnCheckboxCss;

const dvnFieldDisplayCellCss = ".sc-dvn-field-display-cell-h{font-size:0.9em;margin:0px 0px calc(4 * var(--spacing-unit)) 0px;display:block}.sc-dvn-field-display-cell-h:last-child{margin-bottom:0}.title.sc-dvn-field-display-cell{font-size:0.8em;margin-bottom:calc(2 * var(--spacing-unit));color:var(--color-text-secondary)}";

const DvnFieldDisplayCell = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.showTitle = true;
  }
  render() {
    const { field, infoTitle, showTitle, value } = this;
    let Tag = `dvn-field-display-cell-${field.type}`;
    let fieldToPass = field;
    if (field.type === nested.NestedField.type) {
      Tag = `dvn-field-display-cell-${field.nestedField.type}`;
      fieldToPass = field.nestedField;
    }
    return (index.h(index.Host, null, showTitle && index.h("div", { class: "title" }, (infoTitle || '').toUpperCase()), Tag
      ? index.h(Tag, { field: fieldToPass, value: value, meta: this.meta })
      : index.h("span", null, value)));
  }
};
DvnFieldDisplayCell.style = dvnFieldDisplayCellCss;

const dvnFieldInputCellCss = "dvn-field-input-cell{display:block;height:100%}";

const DvnFieldInputCell = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.getTag = () => {
      const { field } = this;
      let Tag = `dvn-field-input-cell-${field.type}`;
      let fieldToPass = field;
      if (field.type === nested.NestedField.type) {
        Tag = `dvn-field-input-cell-${field.nestedField.type}`;
        fieldToPass = field.nestedField;
      }
      return {
        Tag, fieldToPass
      };
    };
  }
  componentDidLoad() {
    var _a, _b;
    const { Tag } = this.getTag();
    (_b = (_a = this.el.querySelector(Tag)) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
  }
  render() {
    const { value } = this;
    const { Tag, fieldToPass } = this.getTag();
    return (index.h(index.Host, null, index.h(Tag, { field: fieldToPass, value: value })));
  }
  get el() { return index.getElement(this); }
};
DvnFieldInputCell.style = dvnFieldInputCellCss;

const dvnListViewTableCss = ".sc-dvn-list-view-table-h{-ms-flex:1 1 1px;flex:1 1 1px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.table-progress-container.sc-dvn-list-view-table{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-height:calc(14 * var(--spacing-unit))}.error-container.sc-dvn-list-view-table{padding:calc(4 * var(--spacing-unit))}";

var __rest = (undefined && undefined.__rest) || function (s, e) {
  var t = {};
  for (var p in s)
    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
      t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
    for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
      if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
        t[p[i]] = s[p[i]];
    }
  return t;
};
function getFieldFromData(fields, fieldData) {
  return fieldData.fieldDisplay || field.findField(fields, fieldData.fieldId);
}
function getColumnData(config, field, fieldId) {
  if (!config.columns || (!config.columns[field.id] && !config.columns[fieldId])) {
    return {
      weight: 1,
    };
  }
  return config.columns[field.id] || config.columns[fieldId];
}
function calculateActionsWidth(actions = []) {
  return actions.length * 40;
}
const DvnListViewTable = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.action = index.createEvent(this, "action", 7);
    this.retry = index.createEvent(this, "retry", 7);
    this.modifyItem = index.createEvent(this, "modifyItem", 7);
    this.items = [];
    this.isEndReached = false;
    this.isProgressing = false;
    this.checkboxSelection = false;
    this.fields = [];
    this.params = {};
    this.scrollToFit = false;
    this.strings = i18n.dvnCardListViewI18nDefault;
    this.selectedItems = [];
    this.selectedAllCheck = false;
    this.renderHeader = (config, fields, tableColumnConfig, setRef, totalWidth, actionsWidth) => {
      let actionsPlaceholder;
      if (config.actions && config.actions.length > 0) {
        actionsPlaceholder = (index.h("dvn-table-header-cell", { width: actionsWidth }));
      }
      return (index.h("dvn-table-header", { elevation: config.elevation, separation: config.separation, width: `${totalWidth}px`, ref: setRef }, config.actionsPlacement === 'left' && actionsPlaceholder, this.checkboxSelection &&
        index.h("dvn-table-header-cell", { width: 50, style: {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center'
          } }, index.h("dvn-checkbox", { tint: 'primary', onChange: (e) => {
            if (e.detail) {
              this.selectedItems = this.items;
            }
            else {
              this.selectedItems = [];
            }
            this.selectedAllCheck = !this.selectedAllCheck;
            this.onRowSelection(this.selectedItems);
          } })), tableColumnConfig.map(columnConfig => {
        const field = getFieldFromData(fields, columnConfig);
        return (index.h("dvn-table-header-cell", { isEditable: columnConfig.isEditable, weight: getColumnData(config, field, columnConfig.fieldId).weight, width: getColumnData(config, field, columnConfig.fieldId).width }, field.title));
      }), config.actionsPlacement !== 'left' && actionsPlaceholder));
    };
    this.renderRow = (config, fields, tableColumnConfig, actionEvent, modifyItemEvent, item, params, index$1, totalWidth, actionsWidth) => {
      let actionsCell;
      if (config.actions && config.actions.length > 0) {
        actionsCell = (index.h("dvn-table-cell", { width: actionsWidth }, config.actions.map(action => actionUtil.generateActionComponent(index$1, params, item, actionEvent, action, { leaned: true }))));
      }
      return (index.h("dvn-table-row", { key: item._id, elevation: config.elevation, separation: config.separation, removeSpacing: true, width: `${totalWidth}px` }, config.actionsPlacement === 'left' && actionsCell, this.checkboxSelection &&
        index.h("dvn-table-cell", { width: 50, style: {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center'
          } }, index.h("dvn-checkbox", { tint: 'primary', checked: this.selectedAllCheck, onChange: (e) => {
            if (e.detail) {
              this.selectedItems = [
                ...this.selectedItems,
                item
              ];
            }
            else {
              this.selectedItems = this.selectedItems.filter(item => item._id !== e.target.name);
            }
            this.onRowSelection(this.selectedItems);
          }, name: item._id })), tableColumnConfig.map((columnConfig) => {
        const { fieldId, fieldDisplay } = columnConfig, meta = __rest(columnConfig, ["fieldId", "fieldDisplay"]);
        const rootField = field.findRootField(fields, columnConfig.fieldId);
        const field$1 = getFieldFromData(fields, columnConfig);
        const columnData = getColumnData(config, field$1, fieldId);
        if (columnConfig.componentTag) {
          const Tag = columnConfig.componentTag;
          return (index.h("dvn-table-cell", { weight: columnData.weight, width: columnData.width }, index.h(Tag, { field: field$1, item: item, meta: meta })));
        }
        return (index.h("dvn-table-cell", { editable: columnConfig.isEditable, weight: columnData.weight, width: columnData.width, onCellValueChange: (event) => {
            event.stopPropagation();
            modifyItemEvent.emit({
              rootField,
              field: field$1,
              item,
              value: event.detail.value,
              apiValue: event.detail.apiValue,
            });
          }, renderDisplay: () => (index.h("dvn-field-display-cell", { showTitle: false, field: field$1, value: dataModel.getDataModelFieldDisplayValue(item, field$1, columnConfig.fieldId), meta: meta })), renderEdit: () => (index.h("dvn-field-input-cell", { field: field$1, value: dataModel.getDataModelFieldDisplayValue(item, field$1, columnConfig.fieldId) })) }));
      }), config.actionsPlacement !== 'left' && actionsCell));
    };
  }
  componentWillLoad() {
    this.selectedItems = [];
  }
  render() {
    const { items, config, params, strings } = this;
    const { elevation, fields: tableColumnConfigs, hideHeader = false, separation = 0 } = config;
    const actionsWidth = config.actionsWidth || calculateActionsWidth(config.actions) || 0;
    let totalWidth = actionsWidth || 0;
    tableColumnConfigs.forEach(columnConfig => {
      const field = getFieldFromData(this.fields, columnConfig);
      totalWidth += getColumnData(config, field, columnConfig.fieldId).width || 100;
    });
    return (index.h(index.Host, null, index.h("dvn-table", { leaned: true, scrollToFit: this.scrollToFit }, !hideHeader && this.renderHeader(config, this.fields, tableColumnConfigs, el => this.tableHeaderRef = el, totalWidth, actionsWidth), index.h("dvn-table-body", { elevation: elevation, separation: separation, ref: el => this.tableBodyRef = el, onScroll: () => {
        if (this.tableHeaderRef) {
          this.tableHeaderRef.scrollLeft = this.tableBodyRef.scrollLeft;
        }
      }, scrollToFit: this.scrollToFit }, items.map((item, index) => this.renderRow(config, this.fields, tableColumnConfigs, this.action, this.modifyItem, item, params, index, totalWidth, actionsWidth)), !this.isProgressing && !this.error && items.length === 0 &&
      index.h("p", { class: "text-centered p-3" }, strings.noItemInList), !this.isEndReached &&
      index.h("div", { class: "table-progress-container" }, this.isProgressing &&
        index.h("dvn-progress", { indefinite: true, tint: "primary" }), this.error &&
        index.h("div", { class: "error-container d-flex align-items-center justify-content-center flex-column" }, this.error, index.h("dvn-button", { onClick: () => this.retry.emit() }, "Retry")))))));
  }
};
DvnListViewTable.style = dvnListViewTableCss;

const dvnTableCss = "dvn-table{-ms-flex:1 1 1px;flex:1 1 1px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}dvn-table.leaned{padding:0}dvn-table.scroll-to-fit{overflow:hidden}";

const DvnTable = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.leaned = false;
    this.scrollToFit = false;
  }
  render() {
    return (index.h(index.Host, { class: { leaned: this.leaned, 'scroll-to-fit': this.scrollToFit } }, index.h("slot", null)));
  }
};
DvnTable.style = dvnTableCss;

const dvnTableBodyCss = "dvn-table-body{-ms-flex:1 1 1px;flex:1 1 1px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}dvn-table-body.elevated-1{padding:0 4px}dvn-table-body .elevated-2{padding:0 6px}dvn-table-body .elevated-3{padding:0 8px}dvn-table-body.scroll-to-fit{overflow:auto}";

const DvnTableBody = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.scrollToBottom = index.createEvent(this, "scrollToBottom", 7);
    this.separation = 0;
    this.elevation = 0;
    this.scrollToFit = false;
  }
  handleScroll() {
    if (this.el.offsetHeight + this.el.scrollTop >= this.el.scrollHeight) {
      this.scrollToBottom.emit();
    }
  }
  render() {
    return (index.h(index.Host, { class: {
        [`separated-${this.separation}`]: true,
        [`elevated-${this.elevation}`]: true,
        'scroll-to-fit': this.scrollToFit,
      } }, index.h("slot", null)));
  }
  get el() { return index.getElement(this); }
};
DvnTableBody.style = dvnTableBodyCss;

const dvnTableCellCss = ".sc-dvn-table-cell-h{display:block;--cell-spacing-top:calc(3 * var(--spacing-unit));--cell-padding:var(--cell-spacing-top) calc(2 * var(--spacing-unit));--cell-height:calc(var(--cell-spacing-top) * 2 + 31px);-ms-flex:var(--cell-weight);flex:var(--cell-weight);min-width:var(--cell-width);height:var(--cell-height);color:var(--color-text-title);outline:none;border-radius:3px;padding:var(--cell-padding)}.focused.sc-dvn-table-cell-h{-webkit-box-shadow:inset 0px 0px 0px 2px var(--color-primary);box-shadow:inset 0px 0px 0px 2px var(--color-primary)}.sc-dvn-table-cell-h .small.sc-dvn-table-cell{--cell-padding:calc(2 * var(--spacing-unit)) calc(1 * var(--spacing-unit))}.sc-dvn-table-cell-h .medium.sc-dvn-table-cell{--cell-padding:calc(3 * var(--spacing-unit)) calc(2 * var(--spacing-unit))}.sc-dvn-table-cell-h .large.sc-dvn-table-cell{--cell-padding:calc(4 * var(--spacing-unit)) calc(3 * var(--spacing-unit))}";

const DvnTableCell = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.cellValueChange = index.createEvent(this, "cellValueChange", 7);
    this.focused = false;
    this.isValueChanged = false;
  }
  onCellFormSubmit(event) {
    event.stopPropagation();
    this.cellValueChange.emit(event.detail);
    this.focused = false;
  }
  onCellFormCancel(event) {
    event.stopPropagation();
    this.focused = false;
  }
  render() {
    var _a, _b;
    const { focused, weight, width } = this;
    const style = {};
    if (weight) {
      style['--cell-weight'] = `${weight} 0 ${width || 100}px`;
      style['--cell-width'] = `0px`;
    }
    else {
      style['--cell-weight'] = `0 0 ${width}px`;
      style['--cell-width'] = `${width}px`;
    }
    return (index.h(index.Host, { class: { focused }, style: style, onClick: () => {
        if (!this.editable)
          return;
        this.focused = true;
      } }, focused ? (_a = this.renderEdit) === null || _a === void 0 ? void 0 : _a.call(this) : (_b = this.renderDisplay) === null || _b === void 0 ? void 0 : _b.call(this), index.h("slot", null)));
  }
  get el() { return index.getElement(this); }
};
DvnTableCell.style = dvnTableCellCss;

const dvnTableHeaderCss = ".sc-dvn-table-header-h{display:block;border-bottom:1px solid var(--color-border);background:var(--color-elevated-item-background);border-top-right-radius:var(--corner-radius);border-top-left-radius:var(--corner-radius);overflow:hidden}.small.sc-dvn-table-header-h{--row-padding:calc(1 * var(--spacing-unit)) calc(1 * var(--spacing-unit))}.medium.sc-dvn-table-header-h{--row-padding:calc(1 * var(--spacing-unit)) calc(2 * var(--spacing-unit))}.large.sc-dvn-table-header-h{--row-padding:calc(3 * var(--spacing-unit)) calc(3 * var(--spacing-unit))}.no-spacing.sc-dvn-table-header-h{--row-padding:0}.separated-1.sc-dvn-table-header-h,.separated-2.sc-dvn-table-header-h,.separated-3.sc-dvn-table-header-h{border-radius:var(--corner-radius);border-bottom:none;background:none}.elevated-1.sc-dvn-table-header-h{margin:0 4px;-webkit-box-shadow:0 1px 4px rgba(var(--color-elevated-item-shadow), 0.03);box-shadow:0 1px 4px rgba(var(--color-elevated-item-shadow), 0.03)}.elevated-2.sc-dvn-table-header-h{margin:0 6px;-webkit-box-shadow:0 2px 6px rgba(var(--color-elevated-item-shadow), 0.08);box-shadow:0 2px 6px rgba(var(--color-elevated-item-shadow), 0.08)}.elevated-3.sc-dvn-table-header-h{margin:0 8px;-webkit-box-shadow:0 2px 8px rgba(var(--color-elevated-item-shadow), 0.05);box-shadow:0 2px 8px rgba(var(--color-elevated-item-shadow), 0.05)}.header-items-container.sc-dvn-table-header{display:-ms-flexbox;display:flex}";

const DvnTableHeader = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.scale = 'medium';
    this.removeSpacing = false;
    this.separation = 0;
    this.elevation = 0;
  }
  render() {
    return (index.h(index.Host, { class: {
        [this.scale]: true,
        'no-spacing': this.removeSpacing,
        [`separated-${this.separation}`]: true,
        [`elevated-${this.elevation}`]: true,
      } }, index.h("div", { class: "header-items-container", style: { minWidth: this.width } }, index.h("slot", null))));
  }
};
DvnTableHeader.style = dvnTableHeaderCss;

const dvnTableHeaderCellCss = ".sc-dvn-table-header-cell-h{display:block;--cell-height:31px;--cell-padding:calc(2 * var(--spacing-unit)) calc(2 * var(--spacing-unit) + 6px);font-size:0.9em;font-weight:bold;-ms-flex:var(--cell-weight);flex:var(--cell-weight);height:var(--cell-height);padding:var(--cell-padding);color:var(--color-text-title);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative}.editable.sc-dvn-table-header-cell-h:before{content:'';position:absolute;width:4px;height:4px;background:var(--color-secondary);border-radius:50%;margin-left:-8px}";

const DvnTableHeaderCell = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.isEditable = false;
  }
  render() {
    const { isEditable, weight, width } = this;
    const style = {};
    if (weight) {
      style['--cell-weight'] = `${weight} 0 ${width || 100}px`;
      style['--cell-width'] = `0px`;
    }
    else {
      style['--cell-weight'] = `0 0 ${width}px`;
      style['--cell-width'] = `${width}px`;
    }
    return (index.h(index.Host, { class: { editable: isEditable }, style: style }, index.h("slot", null)));
  }
};
DvnTableHeaderCell.style = dvnTableHeaderCellCss;

const dvnTableRowCss = ".sc-dvn-table-row-h{display:-ms-flexbox;display:flex;border-bottom:1px solid var(--color-border);padding:var(--row-padding);background:var(--color-elevated-item-background);-webkit-transition:background-color .2s;transition:background-color .2s;margin:var(--row-margin)}.sc-dvn-table-row-h:hover{background:var(--color-background-primary)}:not(dvn-table-header+dvn-table-body)>.sc-dvn-table-row-h:first-child{border-top-right-radius:var(--corner-radius);border-top-left-radius:var(--corner-radius)}.sc-dvn-table-row-h:last-of-type{border-bottom-right-radius:var(--corner-radius);border-bottom-left-radius:var(--corner-radius)}.small.sc-dvn-table-row-h{--row-padding:calc(2 * var(--spacing-unit)) calc(1 * var(--spacing-unit))}.medium.sc-dvn-table-row-h{--row-padding:calc(3 * var(--spacing-unit)) calc(2 * var(--spacing-unit))}.large.sc-dvn-table-row-h{--row-padding:calc(4 * var(--spacing-unit)) calc(3 * var(--spacing-unit))}.no-spacing.sc-dvn-table-row-h{--row-padding:0}.separated-1.sc-dvn-table-row-h,.separated-2.sc-dvn-table-row-h,.separated-3.sc-dvn-table-row-h{border-radius:var(--corner-radius);border-bottom:none}.separated-0.sc-dvn-table-row-h:hover,.separated-1.sc-dvn-table-row-h:hover,.separated-2.sc-dvn-table-row-h:hover,.separated-3.sc-dvn-table-row-h:hover{background:var(--color-elevated-item-background)}.separated-1.sc-dvn-table-row-h{--row-margin:calc(1 * var(--spacing-unit)) 0}.separated-2.sc-dvn-table-row-h{--row-margin:calc(2 * var(--spacing-unit)) 0}.separated-3.sc-dvn-table-row-h{--row-margin:calc(3 * var(--spacing-unit)) 0}.separated.sc-dvn-table-row-h:first-child{margin-top:0}.elevated-1.sc-dvn-table-row-h{-webkit-box-shadow:0 1px 4px rgba(var(--color-elevated-item-shadow), 0.03);box-shadow:0 1px 4px rgba(var(--color-elevated-item-shadow), 0.03)}.elevated-2.sc-dvn-table-row-h{-webkit-box-shadow:0 2px 6px rgba(var(--color-elevated-item-shadow), 0.08);box-shadow:0 2px 6px rgba(var(--color-elevated-item-shadow), 0.08)}.elevated-3.sc-dvn-table-row-h{-webkit-box-shadow:0 2px 8px rgba(var(--color-elevated-item-shadow), 0.05);box-shadow:0 2px 8px rgba(var(--color-elevated-item-shadow), 0.05)}";

const DvnTableRow = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.scale = 'medium';
    this.removeSpacing = false;
    this.separation = 0;
    this.elevation = 0;
  }
  render() {
    return (index.h(index.Host, { class: {
        [this.scale]: true,
        'no-spacing': this.removeSpacing,
        [`separated-${this.separation}`]: true,
        [`elevated-${this.elevation}`]: true,
      }, style: { minWidth: this.width } }, index.h("slot", null)));
  }
};
DvnTableRow.style = dvnTableRowCss;

exports.dvn_checkbox = DvnCheckbox;
exports.dvn_field_display_cell = DvnFieldDisplayCell;
exports.dvn_field_input_cell = DvnFieldInputCell;
exports.dvn_list_view_table = DvnListViewTable;
exports.dvn_table = DvnTable;
exports.dvn_table_body = DvnTableBody;
exports.dvn_table_cell = DvnTableCell;
exports.dvn_table_header = DvnTableHeader;
exports.dvn_table_header_cell = DvnTableHeaderCell;
exports.dvn_table_row = DvnTableRow;
