import { _ as w, $ as h } from "./template-rpthWlT9.js";
import { V as N, bk as v, r as c, __tla as __tla_0 } from "./index-9PRMimni.js";
import { v as d, __tla as __tla_1 } from "./schemas-DzvLPsci.js";
import { a as I } from "./illnessInjury-CN3bQPcI.js";
let D, L, k;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    const a = v(), { t: e } = N(), u = await w(), m = await h();
    k = function() {
        const r = [
            {
                field: "crewName",
                component: "NInput",
                label: e("crew.evaluation.crewName"),
                componentProps: {
                    placeholder: e("crew.evaluation.crewName")
                }
            },
            {
                field: "rankId",
                component: "NSelect",
                label: e("crew.evaluation.rank"),
                componentProps: {
                    options: u,
                    placeholder: e("crew.evaluation.rank"),
                    labelField: a.getLocale === "en" ? "shortNameEn" : "name",
                    valueField: "id"
                }
            },
            {
                field: "vesselId",
                component: "NSelect",
                label: e("crew.evaluation.vesselName"),
                componentProps: {
                    placeholder: e("crew.evaluation.vesselName"),
                    options: d,
                    labelField: a.getLocale === "en" ? "shipNameEn" : "shipName",
                    valueField: "id",
                    filterable: !0,
                    clearable: !0
                }
            },
            {
                field: "injuriesType",
                component: "NSelect",
                label: e("illnessInjury.illnessInjuryType"),
                componentProps: {
                    options: m,
                    placeholder: e("illnessInjury.illnessInjuryType"),
                    labelField: a.getLocale === "en" ? "labelEn" : "label"
                }
            },
            {
                field: "illnessInjuryDate",
                component: "NDatePicker",
                label: e("illnessInjury.illnessInjuryDate"),
                componentProps: {
                    type: "daterange",
                    valueFormat: "yyyy-MM-dd",
                    placeholder: e("illnessInjury.illnessInjuryDate")
                }
            }
        ], o = [
            {
                field: "fileDtoList",
                label: e("noticeCircular.general.Attachment"),
                slot: "attachment"
            }
        ];
        return {
            schemas: r,
            schemasUpload: o
        };
    };
    L = function(r, o, y) {
        const n = c(!1), p = c(!1), t = c([]), b = [
            {
                field: "vesselId",
                component: "NSelect",
                label: e("crew.evaluation.vesselName"),
                labelWidth: 150,
                giProps: {
                    span: 3
                },
                componentProps: {
                    placeholder: e("crew.evaluation.vesselName"),
                    options: d,
                    disabled: !0,
                    labelField: a.getLocale === "en" ? "shipNameEn" : "shipName",
                    valueField: "id",
                    filterable: !0,
                    clearable: !0
                }
            },
            {
                field: "rankId",
                component: "NSelect",
                label: e("crew.evaluation.rank"),
                labelWidth: 150,
                giProps: {
                    span: 3
                },
                componentProps: {
                    options: u,
                    disabled: n,
                    placeholder: e("crew.evaluation.rank"),
                    labelField: a.getLocale === "en" ? "shortNameEn" : "name",
                    valueField: "id",
                    async onUpdateValue (l) {
                        r(l);
                    }
                }
            },
            {
                field: "crewId",
                component: "NSelect",
                label: e("crew.evaluation.crewName"),
                labelWidth: 150,
                giProps: {
                    span: 3
                },
                hidden: !0,
                componentProps: {
                    options: t,
                    disabled: n,
                    labelField: a.getLocale === "en" ? "crewNameEn" : "crewName",
                    valueField: "crewId",
                    placeholder: e("crew.evaluation.crewName")
                },
                rules: [
                    {
                        required: !0,
                        type: "number",
                        message: e("crew.evaluation.crewName"),
                        trigger: [
                            "blur"
                        ]
                    }
                ]
            },
            {
                field: "crewIdis",
                component: "NSelect",
                label: e("crew.evaluation.crewName"),
                labelWidth: 150,
                giProps: {
                    span: 3
                },
                componentProps: {
                    options: t,
                    disabled: n,
                    labelField: a.getLocale === "en" ? "crewNameEn" : "crewName",
                    valueField: "crewId",
                    placeholder: e("crew.evaluation.crewName"),
                    onUpdateValue (l) {
                        const s = t.value.find((i)=>i.crewId === l);
                        y(l, s);
                    }
                },
                rules: [
                    {
                        required: !0,
                        type: "any",
                        message: e("crew.evaluation.crewName"),
                        trigger: [
                            "blur"
                        ]
                    }
                ]
            },
            {
                field: "injuriesDate",
                component: "NDatePicker",
                label: e("illnessInjury.illnessInjuryDate"),
                labelWidth: 150,
                giProps: {
                    span: 3
                },
                componentProps: {
                    type: "date",
                    disabled: n,
                    valueFormat: "yyyy-MM-dd",
                    placeholder: e("illnessInjury.illnessInjuryDate")
                }
            },
            {
                field: "injuriesType",
                component: "NSelect",
                label: e("illnessInjury.illnessInjuryType"),
                labelWidth: 150,
                giProps: {
                    span: 3
                },
                componentProps: {
                    options: m,
                    disabled: p,
                    placeholder: e("illnessInjury.illnessInjuryType"),
                    labelField: a.getLocale === "en" ? "labelEn" : "label",
                    onUpdateValue (l) {
                        o(l);
                    }
                },
                rules: [
                    {
                        required: !0,
                        message: e("illnessInjury.illnessInjuryType"),
                        trigger: [
                            "blur"
                        ]
                    }
                ]
            },
            {
                field: "upBroadDate",
                component: "NDatePicker",
                label: e("illnessInjury.signOffDate"),
                labelWidth: 150,
                giProps: {
                    span: 3
                },
                componentProps: {
                    type: "date",
                    disabled: n,
                    valueFormat: "yyyy-MM-dd",
                    placeholder: e("illnessInjury.signOffDate")
                }
            },
            {
                field: "remarks",
                component: "NInput",
                label: e("monthlyReport.remark"),
                labelWidth: 150,
                giProps: {
                    span: 6
                },
                componentProps: {
                    disabled: n,
                    placeholder: e("monthlyReport.remark")
                }
            }
        ];
        return {
            methods: {
                async updateCrewNameList (l, s) {
                    const i = await I({
                        vesselId: +l,
                        rankId: s
                    });
                    t.value = i;
                },
                updateReadOnly: (l)=>{
                    n.value = l;
                },
                updateType: (l)=>{
                    p.value = l;
                }
            },
            contentSchemas: b
        };
    };
    D = [
        {
            field: "fileDtoList",
            label: e("noticeCircular.general.Attachment"),
            slot: "attachment"
        }
    ];
});
export { D as a, L as c, k as s, __tla };
