import{__decorate as e}from"tslib";import{html as s}from"lit";import{property as t,customElement as l}from"lit/decorators.js";import{s as i}from"./nile-table-cell-item.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";import{H as a}from"../internal/slot.esm.js";import{c as o,r as n}from"../internal/resizable-table-helper.esm.js";import"../internal/resizable-table-styles.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let m=class extends r{constructor(){super(...arguments),this.hasSlotController=new a(this,"[default]"),this.resizable=!1,this.handleResizeStart=o(this,50)}static get styles(){return[i]}updated(e){if(super.updated(e),e.has("resizable")&&!this.resizable){const e=this.closest("nile-table-body");e&&n(e)}}render(){return this.resizable?s`
        <div class="cell__wrapper" part="nile__table-cell">
          ${this.hasSlotController.test("[default]")?s` <div class="column" part="nile__table-cell"><slot></slot></div>`:""}
          <div class="resizer" @mousedown=${this.handleResizeStart}></div>
        </div>
      `:s`
        ${this.hasSlotController.test("[default]")?s` <slot class="column" part="nile__table-cell"> </slot>`:""}
      `}};e([t({type:Boolean,reflect:!0})],m.prototype,"resizable",void 0),m=e([l("nile-table-cell-item")],m);export{m as N};
