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

const dvnFieldDisplayCellSingleChoiceCss = ".sc-dvn-field-display-cell-single-choice-h{display:block;height:32px;padding:6px}.tag-wrapper.sc-dvn-field-display-cell-single-choice-h{padding:4px 6px}.sc-dvn-field-display-cell-single-choice-h:not(.tag-wrapper){overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";

let DvnFieldDisplayCellSingleChoice = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    const option = this.field.getOptionOfValue(this.value);
    return (h(Host, { class: {
        'tag-wrapper': !!option.tint,
      } }, option.tint
      ? h("dvn-button", { leaned: true, scale: "small", shape: "rounded", tint: option.tint, view: "ghost", tagMode: true }, option.label)
      : option.label));
  }
};
DvnFieldDisplayCellSingleChoice.style = dvnFieldDisplayCellSingleChoiceCss;

export { DvnFieldDisplayCellSingleChoice as dvn_field_display_cell_single_choice };
