import { r as registerInstance, d as createEvent, h } from './core-34fac203.js';
import './utils-3aef1637.js';
import { T as TableClasses } from './table.utils-2f05f2ec.js';

const RenderRow = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /**
         * Renderer to use for cell content when the selected cell conditions are met
         */
        this.row = this.renderRow.bind(this);
        /**
         * Test function for when to use this renderer
         */
        this.when = () => true;
        this.anjRowControlDidLoad = createEvent(this, "anjRowControlDidLoad", 7);
    }
    componentDidLoad() {
        this.anjRowControlDidLoad.emit();
    }
    renderRow(props) {
        if (this.template) {
            return h("tr", { class: TableClasses.row, ref: r => props.renderer.rowTemplate(this.template, r, props.row, props.rowIndex) });
        }
        else if (this.formatter) {
            return h("tr", { class: TableClasses.row, innerHTML: this.formatter(props.row) });
        }
        else {
            return h("tr", { class: TableClasses.row }, this.renderer(props.row));
        }
    }
};

export { RenderRow as anj_render_row };
