import { V as m, bk as c, r as n, __tla as __tla_0 } from "./index-9PRMimni.js";
import { v as s, __tla as __tla_1 } from "./schemas-DzvLPsci.js";
import { o as h } from "./template-rpthWlT9.js";
let P, R, g, v, f;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    const { t: e } = m(), i = c(), d = await h();
    f = function() {
        const o = [
            {
                field: "vesselId",
                component: "NSelect",
                label: e("monthlyReport.vessel"),
                componentProps: {
                    placeholder: e("crew.crewList.vesselName"),
                    options: s,
                    labelField: i.getLocale === "en" ? "shipNameEn" : "shipName",
                    valueField: "id",
                    filterable: !0,
                    clearable: !0
                }
            },
            {
                field: "yearMonthStr",
                component: "NDatePicker",
                label: e("monthlyReport.month"),
                componentProps: {
                    type: "month",
                    valueFormat: "yyyy-MM",
                    placeholder: e("monthlyReport.month")
                }
            }
        ], t = [
            {
                field: "remark",
                component: "NInput",
                label: e("crewTraining.reason"),
                labelWidth: 100,
                giProps: {
                    span: 13
                },
                componentProps: {
                    type: "textarea",
                    autosize: {
                        minRows: 2,
                        maxRows: 3
                    },
                    placeholder: e("crewTraining.reason")
                }
            }
        ], l = [
            {
                field: "fileDtoList",
                label: e("noticeCircular.general.Attachment"),
                slot: "attachment"
            }
        ];
        return {
            schemas: o,
            examineAndApproveSchema: t,
            schemasUpload: l
        };
    };
    P = function(o, t) {
        const l = n(!0);
        return {
            contentSchemas: [
                {
                    field: "vesselId",
                    component: "NSelect",
                    label: e("monthlyReport.vessel"),
                    labelWidth: 120,
                    giProps: {
                        span: 3
                    },
                    componentProps: {
                        placeholder: e("crew.crewList.vesselName"),
                        options: s,
                        disabled: !0,
                        labelField: i.getLocale === "en" ? "shipNameEn" : "shipName",
                        valueField: "id",
                        filterable: !0,
                        clearable: !0,
                        onUpdateValue (a) {
                            o(a);
                        }
                    },
                    rules: [
                        {
                            required: !0,
                            type: "number",
                            message: e("drill.addPlan.addSelectPlaceholder") + e("crew.crewList.vesselName"),
                            trigger: [
                                "blur"
                            ]
                        }
                    ]
                },
                {
                    field: "yearMonthStr",
                    component: "NDatePicker",
                    label: e("monthlyReport.month"),
                    labelWidth: 120,
                    giProps: {
                        span: 3
                    },
                    componentProps: {
                        type: "month",
                        valueFormat: "yyyy-MM",
                        disabled: l,
                        placeholder: e("monthlyReport.month"),
                        onUpdateValue (a) {
                            t(a);
                        }
                    },
                    rules: [
                        {
                            required: !0,
                            type: "string",
                            message: e("drill.addPlan.addSelectPlaceholder") + e("monthlyReport.month"),
                            trigger: [
                                "blur"
                            ]
                        }
                    ]
                }
            ],
            methods: {
                updateView (a) {
                    l.value = a;
                }
            }
        };
    };
    g = function() {
        const o = n(!0), t = [
            {
                field: "onBroadPort",
                component: "NInput",
                label: e("monthlyReport.portOfArr"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                slot: "onBroadPort",
                componentProps: {
                    disabled: o,
                    placeholder: e("monthlyReport.portOfArr")
                }
            },
            {
                field: "onBroadDate",
                component: "NDatePicker",
                label: e("monthlyReport.dateOfArr"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                componentProps: {
                    type: "date",
                    valueFormat: "yyyy-MM-dd",
                    disabled: o,
                    placeholder: e("monthlyReport.dateOfArr")
                }
            },
            {
                field: "upBroadPort",
                component: "NInput",
                label: e("monthlyReport.portOfDep"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                slot: "upBroadPort",
                componentProps: {
                    disabled: o,
                    placeholder: e("monthlyReport.portOfDep")
                }
            },
            {
                field: "upBroadDate",
                component: "NDatePicker",
                label: e("monthlyReport.dateOfDep"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                componentProps: {
                    type: "date",
                    valueFormat: "yyyy-MM-dd",
                    disabled: o,
                    placeholder: e("monthlyReport.dateOfDep")
                }
            },
            {
                field: "imo",
                component: "NInput",
                label: e("monthlyReport.iMONumber"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                componentProps: {
                    disabled: !0,
                    placeholder: e("monthlyReport.iMONumber")
                }
            },
            {
                field: "callSign",
                component: "NInput",
                label: e("monthlyReport.callSign"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                componentProps: {
                    disabled: !0,
                    placeholder: e("monthlyReport.callSign")
                }
            },
            {
                field: "flagStateId",
                component: "NSelect",
                label: e("monthlyReport.nationnalityOfShip"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                componentProps: {
                    placeholder: e("monthlyReport.nationnalityOfShip"),
                    options: d,
                    disabled: o,
                    "value-field": "id",
                    "label-field": "flag"
                }
            },
            {
                field: "portArrivalFrom",
                component: "NInput",
                label: e("monthlyReport.portArrivalFrom"),
                labelWidth: 120,
                giProps: {
                    span: 3
                },
                slot: "portArrivalFrom",
                componentProps: {
                    disabled: o,
                    placeholder: e("monthlyReport.portArrivalFrom")
                }
            }
        ];
        return {
            methods: {
                updateIsEditIMO: (r)=>{
                    o.value = r;
                }
            },
            iMOschemas: t
        };
    };
    v = function() {
        const o = n(!0), t = [
            {
                field: "vesselId",
                component: "NSelect",
                label: e("monthlyReport.nameOfShip"),
                labelWidth: 120,
                giProps: {
                    span: 2
                },
                componentProps: {
                    placeholder: e("monthlyReport.nameOfShip"),
                    options: s,
                    disabled: !0,
                    labelField: i.getLocale === "en" ? "shipNameEn" : "shipName",
                    valueField: "id",
                    filterable: !0,
                    clearable: !0
                }
            },
            {
                field: "onBroadPort",
                component: "NInput",
                label: e("monthlyReport.portOfArr"),
                labelWidth: 120,
                giProps: {
                    span: 2
                },
                slot: "onBroadPort",
                componentProps: {
                    disabled: o,
                    placeholder: e("monthlyReport.portOfArr")
                }
            },
            {
                field: "onBroadDate",
                component: "NDatePicker",
                label: e("monthlyReport.dateOfArr"),
                labelWidth: 120,
                giProps: {
                    span: 2
                },
                componentProps: {
                    type: "date",
                    valueFormat: "yyyy-MM-dd",
                    disabled: o,
                    placeholder: e("monthlyReport.dateOfArr")
                }
            },
            {
                field: "flagStateId",
                component: "NSelect",
                label: e("monthlyReport.nationnalityOfShip"),
                labelWidth: 120,
                giProps: {
                    span: 2
                },
                componentProps: {
                    placeholder: e("monthlyReport.nationnalityOfShip"),
                    options: d,
                    disabled: o,
                    "value-field": "id",
                    "label-field": "flag"
                }
            },
            {
                field: "portArrivalFrom",
                component: "NInput",
                label: e("monthlyReport.portArrivalFrom"),
                labelWidth: 120,
                giProps: {
                    span: 2
                },
                slot: "portArrivalFrom",
                componentProps: {
                    disabled: o,
                    placeholder: e("monthlyReport.portArrivalFrom")
                }
            }
        ];
        return {
            methods: {
                updateIsEditIMO: (r)=>{
                    o.value = r;
                }
            },
            oilIMOregister: t
        };
    };
    R = function() {
        const o = n(1), t = [
            {
                field: "remark",
                component: "NInput",
                label: e("interview.reason"),
                labelWidth: 100,
                giProps: {
                    span: 13
                },
                componentProps: {
                    type: "textarea",
                    autosize: {
                        minRows: 2,
                        maxRows: 3
                    },
                    placeholder: e("interview.reason")
                },
                rules: [
                    {
                        required: !1,
                        message: e("interview.reason")
                    }
                ]
            }
        ];
        return {
            methods: {
                updateType: (r)=>{
                    o.value = r;
                    const p = t.find((a)=>a.field === "remark");
                    return p && (p.rules = [
                        {
                            required: r !== 1,
                            message: e("interview.reason")
                        }
                    ]), t;
                },
                getSchema: ()=>t
            },
            examineAndApproveSchema: t
        };
    };
});
export { P as c, R as e, g as i, v as o, f as s, __tla };
