import { V as U, bk as _, Z as t, ae as T, B as N, aI as S, r as f, k as u, cb as m, c9 as y, c8 as k, __tla as __tla_0 } from "./index-9PRMimni.js";
import { v as j, __tla as __tla_1 } from "./schemas-DzvLPsci.js";
import { _ as R, $ as D } from "./template-rpthWlT9.js";
let Y, B, A;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    const { t: d } = U(), n = _(), O = await R(), W = await D();
    B = function(r) {
        return {
            1: {
                color: "rgba(33, 128, 241, 0.12)",
                textColor: "rgba(33, 128, 241, 1)",
                borderColor: "rgba(33, 128, 241, 0.50)"
            },
            2: {
                color: "rgba(148, 99, 226, 0.12)",
                textColor: "rgba(148, 99, 226, 1)",
                borderColor: "rgba(148, 99, 226, 0.50)"
            }
        }[r] || {
            backgroundColor: "#f5f5f5",
            textColor: "#666666",
            borderColor: "#dddddd"
        };
    };
    const v = [
        {
            label: "男",
            labelEn: "Male",
            value: "1"
        },
        {
            label: "女",
            labelEn: "Female",
            value: "2"
        }
    ], p = [
        {
            label: "是",
            labelEn: "Yes",
            value: "1"
        },
        {
            label: "否",
            labelEn: "No",
            value: "0"
        }
    ], M = [
        {
            label: "船上",
            labelEn: "On Board",
            value: "1"
        },
        {
            label: "岸上",
            labelEn: "On Shore",
            value: "2"
        }
    ];
    Y = function(r) {
        return [
            {
                title: d("crew.No"),
                key: "",
                width: 60,
                render (s, i) {
                    return i + 1;
                }
            },
            {
                title: d("crew.evaluation.crewName"),
                key: "crewName",
                width: 120,
                render: (s)=>n.getLocale === "en" ? s.crewNameEn : s.crewName
            },
            {
                title: d("crew.evaluation.rank"),
                key: "rankId",
                width: 120,
                render: (s)=>{
                    const i = O.find((h)=>h.id == s.rankId) || {}, o = Number(i.deptType) || 0, c = B(o), b = n.getLocale === "en" ? i.shortNameEn || "-" : i.name || "-";
                    return t(T, {
                        style: {
                            backgroundColor: c.backgroundColor,
                            color: c.textColor,
                            borderColor: c.borderColor,
                            borderWidth: "1px",
                            borderStyle: "solid",
                            borderRadius: "4px",
                            padding: "2px 8px"
                        },
                        bordered: !1
                    }, {
                        default: ()=>b
                    });
                }
            },
            {
                title: d("crew.evaluation.vesselName"),
                key: "vesselId",
                width: 120,
                render (s) {
                    const i = j.find((o)=>o.id === s.vesselId);
                    return n.getLocale === "en" ? i?.shipNameEn : i?.shipName;
                }
            },
            {
                title: d("illnessInjury.illnessInjuryType"),
                key: "injuriesType",
                width: 120,
                render (s) {
                    const i = W.find((o)=>o.value === s.injuriesType);
                    return n.getLocale === "en" ? i?.labelEn : i?.label;
                }
            },
            {
                title: d("illnessInjury.signOffDate"),
                key: "upBroadDate",
                width: 120
            },
            {
                title: d("illnessInjury.illnessInjuryDate"),
                key: "injuriesDate",
                width: 120
            },
            {
                title: d("illnessInjury.attachment"),
                key: "attachment",
                width: 120,
                render (s) {
                    return s.attachment ? t(S, {
                        trigger: "hover"
                    }, {
                        trigger: ()=>t(N, {
                                size: "small",
                                style: "text",
                                bordered: !1,
                                secondary: !0,
                                class: "bg-transparent",
                                tag: "a",
                                type: "primary",
                                onClick: ()=>r(s)
                            }, s.attachment),
                        default: ()=>s.attachment
                    }) : 0;
                }
            }
        ];
    };
    A = function(r) {
        const g = f("captain"), s = f(!1), i = f(5), o = f(5), c = {
            setTitle: (a)=>{
                g.value = a;
            },
            setTotal: (a)=>{
                i.value = a;
            },
            setaverageLeft: (a)=>{
                o.value = a;
            },
            updateReadOnly: (a)=>{
                s.value = a;
            }
        }, b = [
            {
                key: n.getLocale === "en" ? "nameContentEn" : "nameContent",
                align: "left",
                colSpan: (a, e)=>e === 0 || e === 4 || e === 9 || e === 19 ? 3 : 1,
                render: (a)=>{
                    const e = n.getLocale === "en" ? a.nameContentEn : a.nameContent, l = a.isWeight ? {
                        fontWeight: "bold"
                    } : {};
                    return t("span", {
                        style: l
                    }, e);
                }
            },
            {
                key: "remark1",
                align: "left",
                width: 350,
                ellipsis: !1,
                colSpan: (a, e)=>e === 2 || e === 11 || e === 12 || e === 13 || e === 14 || e === 15 || e === 16 || e === 17 || e === 18 || e === 21 || e === 22 ? 3 : 1,
                render (a, e) {
                    if (e === 1 || e === 2 || e === 3 || e === 5 || e === 7 || e === 11 || e === 12 || e === 13 || e === 14 || e === 15 || e === 16 || e === 17 || e === 18 || e === 21 || e === 22) return t(u, {
                        value: a.remark1,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark1 = l;
                        }
                    });
                    if (e === 6 || e === 8 || e === 10 || e === 20) return t(m, {
                        value: a.remark1,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark1 = l;
                        }
                    });
                }
            },
            {
                key: n.getLocale === "en" ? "titleEn" : "title",
                align: "left"
            },
            {
                key: "remark2",
                align: "left",
                width: 350,
                ellipsis: !1,
                render (a, e) {
                    if (e === 1 || e === 6 || e === 7 || e === 20) return t(u, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    });
                    if (e === 3 || e === 8 || e === 10) return t(m, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    });
                    if (e === 5) return t(k, {
                        value: a.remark2 || "",
                        disabled: r?.readonly,
                        onUpdateValue: (l)=>{
                            a.remark2 = l;
                        }
                    }, v.map((l)=>t(y, {
                            value: l.value,
                            label: n.getLocale === "en" ? l.labelEn : l.label
                        })));
                }
            }
        ], h = [
            {
                key: n.getLocale === "en" ? "nameContentEn" : "nameContent",
                align: "left",
                width: 350,
                rowSpan: (a, e)=>e === 7 || e === 15 ? 2 : 1
            },
            {
                key: "remark1",
                align: "left",
                width: 200,
                ellipsis: !1,
                colSpan: (a, e)=>e === 7 || e === 8 || e === 9 || e === 14 || e === 15 || e === 16 ? 1 : 4,
                render (a, e) {
                    return e === 2 || e === 4 || e === 17 || e === 18 ? t(m, {
                        value: a.remark1,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark1 = l;
                        }
                    }) : e === 5 ? t(k, {
                        value: a.remark1 || "",
                        disabled: r?.readonly,
                        onUpdateValue: (l)=>{
                            a.remark1 = l;
                        }
                    }, M.map((l)=>t(y, {
                            value: l.value,
                            label: n.getLocale === "en" ? l.labelEn : l.label
                        }))) : e === 7 || e === 8 || e === 9 || e === 14 || e === 15 || e === 16 ? n.getLocale === "en" ? a.titleEn : a.title : e === 12 || e === 13 ? t(k, {
                        value: a.remark1 || "",
                        disabled: r?.readonly,
                        onUpdateValue: (l)=>{
                            a.remark1 = l;
                        }
                    }, p.map((l)=>t(y, {
                            value: l.value,
                            label: n.getLocale === "en" ? l.labelEn : l.label
                        }))) : t(u, {
                        value: a.remark1,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark1 = l;
                        }
                    });
                }
            },
            {
                key: "remark2",
                align: "left",
                width: 200,
                ellipsis: !1,
                colSpan: (a, e)=>{
                    if (e === 7 || e === 8 || e === 9) return 3;
                },
                render (a, e) {
                    if (e === 7 || e === 8 || e === 9 || e === 14 || e === 15 || e === 16) return t(u, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    });
                }
            },
            {
                key: "rank",
                align: "left",
                width: 200,
                ellipsis: !1,
                render (a, e) {
                    if (e === 14 || e === 15 || e === 16) return n.getLocale === "en" ? a.rankEn : a.rank;
                }
            },
            {
                key: "remark3",
                align: "left",
                width: 200,
                ellipsis: !1,
                render (a, e) {
                    if (e === 14 || e === 15 || e === 16) return t(u, {
                        value: a.remark3,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark3 = l;
                        }
                    });
                }
            }
        ], C = [
            {
                key: n.getLocale === "en" ? "nameContentEn" : "nameContent",
                align: "left",
                ellipsis: !0
            },
            {
                key: "remark1",
                align: "left",
                width: 350,
                ellipsis: !0,
                colSpan: (a, e)=>e === 1 || e === 2 || e === 3 ? 3 : 1,
                render (a) {
                    return t(u, {
                        value: a.remark1,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (e) {
                            a.remark1 = e;
                        }
                    });
                }
            },
            {
                key: n.getLocale === "en" ? "titleEn" : "title",
                ellipsis: !0,
                align: "left"
            },
            {
                key: "remark2",
                align: "left",
                width: 350,
                ellipsis: !0,
                render (a, e) {
                    return e === 0 ? t(m, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        autosize: {
                            minRows: 1,
                            maxRows: 3
                        },
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    }) : t(u, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    });
                }
            }
        ], L = [
            {
                key: n.getLocale === "en" ? "nameContentEn" : "nameContent",
                align: "left"
            },
            {
                key: "remark",
                align: "left",
                ellipsis: !1,
                render (a, e) {
                    return e === 1 ? t(k, {
                        value: a.remark || "",
                        disabled: r?.readonly,
                        onUpdateValue: (l)=>{
                            a.remark = l;
                        }
                    }, v.map((l)=>t(y, {
                            value: l.value,
                            label: n.getLocale === "en" ? l.labelEn : l.label
                        }))) : t(u, {
                        value: a.remark,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark = l;
                        }
                    });
                }
            },
            {
                key: n.getLocale === "en" ? "titleEn" : "title",
                align: "left"
            },
            {
                key: "remark2",
                align: "left",
                ellipsis: !1,
                render (a, e) {
                    return e === 7 ? null : e === 1 ? t(m, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    }) : t(u, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    });
                }
            }
        ], E = [
            {
                key: n.getLocale === "en" ? "nameContentEn" : "nameContent",
                align: "left",
                colSpan: (a, e)=>e === 0 || e === 1 || e === 6 || e === 13 || e === 14 || e === 18 || e === 21 || e === 28 ? 4 : 1,
                render: (a)=>{
                    const e = n.getLocale === "en" ? a.nameContentEn : a.nameContent, l = a.isWeight ? {
                        fontWeight: "bold"
                    } : {};
                    return t("span", {
                        style: l
                    }, e);
                }
            },
            {
                key: "remark1",
                align: "left",
                width: 350,
                ellipsis: !1,
                colSpan: (a, e)=>e === 16 || e === 17 || e === 15 || e === 5 || e === 9 || e === 12 || e === 19 || e === 20 || e === 22 || e === 23 || e === 24 || e === 25 || e === 26 || e === 27 ? 3 : 1,
                render (a, e) {
                    return e === 16 || e === 17 || e === 15 ? t(m, {
                        value: a.remark1,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark1 = l;
                        }
                    }) : e === 3 ? t(k, {
                        value: a.remark1 || "",
                        disabled: r?.readonly,
                        onUpdateValue: (l)=>{
                            a.remark1 = l;
                        }
                    }, v.map((l)=>t(y, {
                            value: l.value,
                            label: n.getLocale === "en" ? l.labelEn : l.label
                        }))) : t(u, {
                        value: a.remark1,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark1 = l;
                        }
                    });
                }
            },
            {
                key: n.getLocale === "en" ? "titleEn" : "title",
                align: "left"
            },
            {
                key: "remark2",
                align: "left",
                width: 350,
                ellipsis: !1,
                render (a, e) {
                    return e === 3 || e === 29 ? t(m, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    }) : t(u, {
                        value: a.remark2,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    });
                }
            }
        ], V = [
            {
                key: n.getLocale === "en" ? "nameContentEn" : "nameContent",
                align: "left"
            },
            {
                key: "remark",
                align: "left",
                width: 350,
                ellipsis: !1,
                render (a, e) {
                    return e === 1 ? t(m, {
                        value: a.remark,
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark = l;
                        }
                    }) : t(u, {
                        value: a.remark || "",
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark = l;
                        }
                    });
                }
            },
            {
                key: n.getLocale === "en" ? "titleEn" : "title",
                align: "left"
            },
            {
                key: "remark2",
                align: "left",
                width: 350,
                ellipsis: !1,
                render (a, e) {
                    return e === 3 ? t(k, {
                        value: a.remark2 || "",
                        disabled: r?.readonly,
                        onUpdateValue: (l)=>{
                            a.remark2 = l;
                        }
                    }, p.map((l)=>t(y, {
                            value: l.value,
                            label: n.getLocale === "en" ? l.labelEn : l.label
                        }))) : t(u, {
                        value: a.remark2 || "",
                        disabled: r?.readonly,
                        style: {
                            width: "100%"
                        },
                        onUpdateValue (l) {
                            a.remark2 = l;
                        }
                    });
                }
            }
        ];
        return {
            crewHospitalizingReportColumns: b,
            crewInjuryReportColumns: h,
            crewMedicalReportColumns: C,
            patientHealthStatusColumns: L,
            primaryPhysicianReportColumns: E,
            shipsIdentityAndNavigationalStatusColumns: V,
            methods: c
        };
    };
});
export { Y as I, B as g, A as r, __tla };
