/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
import { h } from "@stencil/core";
export const ServiceHistorySubRow = ({ locale, row }) => {
    const laborLines = (row === null || row === void 0 ? void 0 : row.laborLines) || [];
    const partLines = (row === null || row === void 0 ? void 0 : row.partLines) || [];
    const laborHeaders = [
        { key: 'laborCode', label: locale.laborCode },
        { key: 'packageCode', label: locale.packageCode },
        { key: 'serviceCode', label: locale.serviceCode },
        { key: 'serviceDescription', label: locale.serviceDescription, centeredHorizontally: false },
    ];
    const partHeaders = [
        { key: 'partNumber', label: locale.partNumber },
        { key: 'qty', label: locale.qty },
        { key: 'packageCode', label: locale.packageCode },
        { key: 'partDescription', label: locale.partDescription, centeredHorizontally: false },
    ];
    return (h("div", { class: "service-history-subrow", dir: locale.sharedLocales.direction }, h("section", { class: "service-history-subsection" }, h("div", { class: "service-history-subsection-header" }, h("div", { class: "service-history-subsection-title" }, locale.laborLines), h("div", { class: "service-history-subsection-meta" }, laborLines.length)), laborLines.length ? (h("div", { class: "service-history-subsection-table" }, h("information-table", { isRaw: true, headers: laborHeaders, rows: laborLines, size: "small", allowAutoWidth: true, stripCells: false }))) : (h("div", { class: "service-history-empty" }, locale.noData))), h("section", { class: "service-history-subsection" }, h("div", { class: "service-history-subsection-header" }, h("div", { class: "service-history-subsection-title" }, locale.partLines), h("div", { class: "service-history-subsection-meta" }, partLines.length)), partLines.length ? (h("div", { class: "service-history-subsection-table" }, h("information-table", { isRaw: true, headers: partHeaders, rows: partLines, size: "small", allowAutoWidth: true, stripCells: false }))) : (h("div", { class: "service-history-empty" }, locale.noData)))));
};
