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

const dvnFieldDisplayCellTextCss = ".sc-dvn-field-display-cell-text-h{display:block;padding:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";

const DvnFieldDisplayCellText = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    const { field } = this;
    let value = this.value;
    if (this.value && field.inputType === 'url') {
      value = h("a", { href: value.startsWith('http') ? value : `http://${value}`, target: "_blank" }, value);
    }
    return (h(Host, null, value));
  }
};
DvnFieldDisplayCellText.style = dvnFieldDisplayCellTextCss;

export { DvnFieldDisplayCellText as dvn_field_display_cell_text };
