import { html, ViewTemplate } from '@ni/fast-element';
import { TableGroupHeaderView } from '.';
const validateGroupHeaderViewTemplate = (groupHeaderViewTag) => {
    let instance;
    try {
        instance = document.createElement(groupHeaderViewTag);
    }
    catch (_ex) {
        // Swallow construction error to report a better one
    }
    if (!(instance instanceof TableGroupHeaderView)) {
        throw new Error(`Group header view tag name (${groupHeaderViewTag}) must evaluate to an element extending TableGroupHeaderView`);
    }
};
export const createGroupHeaderViewTemplate = (groupHeaderViewTag) => {
    validateGroupHeaderViewTemplate(groupHeaderViewTag);
    return html `
        <${groupHeaderViewTag}
            :groupHeaderValue="${x => x.groupRowValue}"
            :columnConfig="${x => x.groupColumn?.columnInternals.columnConfig}"
            class="group-header-view"
        >
        </${groupHeaderViewTag}>
    `;
};
//# sourceMappingURL=template.js.map