import { i as d, e as m, j as h } from "./template-rpthWlT9.js";
import { r as c, V as u, bk as f, cO as n, cq as a, fm as l, __tla as __tla_0 } from "./index-9PRMimni.js";
let S;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    const r = f(), { t } = u(), g = c([]), b = await m({
        roleType: 2,
        roleCategory: 1
    }), y = await h(), P = await d();
    S = function() {
        const s = c(!1), p = c(null);
        return {
            schemasFsc: [
                {
                    field: "reportNo",
                    component: "NInput",
                    label: t("hsqe.psc.relatedReportNo"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "severity",
                    component: "NSelect",
                    label: t("hsqe.deficiency.servity"),
                    componentProps: {
                        disabled: s,
                        placeholder: t("hsqe.deficiency.servity"),
                        options: P,
                        "label-field": r.getLocale === "en" ? "labelEn" : "label"
                    },
                    rules: [
                        {
                            required: !0,
                            validator: (e, o)=>o != null,
                            message: t("common.chooseText"),
                            trigger: [
                                "blur",
                                "change"
                            ]
                        }
                    ]
                },
                {
                    field: "expirationTime",
                    component: "NDatePicker",
                    label: t("hsqe.psc.dateToRectify"),
                    componentProps: {
                        type: "date",
                        valueFormat: "yyyy-MM-dd",
                        disabled: s,
                        isDateDisabled: (e)=>{
                            const o = new Date;
                            o.setHours(0, 0, 0, 0);
                            const i = new Date(e);
                            return i.setHours(0, 0, 0, 0), i < o;
                        }
                    },
                    rules: [
                        {
                            required: !0,
                            validator: (e, o)=>o != null,
                            message: t("common.chooseText"),
                            trigger: [
                                "blur",
                                "change"
                            ]
                        }
                    ]
                },
                {
                    field: "vesselPositionCode",
                    component: "NSelect",
                    label: t("hsqe.psc.vesselResponsible"),
                    componentProps: {
                        options: b,
                        "label-field": r.getLocale === "en" ? "nameEn" : "name",
                        "value-field": "code",
                        disabled: s
                    },
                    rules: [
                        {
                            required: !0,
                            validator: (e, o)=>o != null,
                            message: t("common.chooseText"),
                            trigger: [
                                "blur",
                                "change"
                            ]
                        }
                    ]
                },
                {
                    field: "officePositionCode",
                    component: "NSelect",
                    label: t("hsqe.psc.officeResponsible"),
                    componentProps: {
                        options: y,
                        "label-field": r.getLocale === "en" ? "nameEn" : "name",
                        "value-field": "code",
                        disabled: s
                    },
                    rules: [
                        {
                            required: !0,
                            validator: (e, o)=>o != null,
                            message: t("common.chooseText"),
                            trigger: [
                                "blur",
                                "change"
                            ]
                        }
                    ]
                },
                {
                    field: "basicDescription",
                    component: "NInput",
                    label: t("hsqe.cdi.description"),
                    componentProps: {
                        type: "textarea",
                        disabled: s,
                        maxlength: 300,
                        showCount: !0
                    },
                    giProps: {
                        span: 5
                    }
                },
                {
                    field: "deficiencyPhotoUrl_Photo",
                    label: t("hsqe.auditInspection.vesselInspection.shipVisitReport.attachment"),
                    component: "SingleImageUpload",
                    componentProps: ({ model: e })=>({
                            action: `${a().urlPrefix}/files`,
                            disabled: s.value,
                            headers: {
                                timestamp: new Date().getTime(),
                                authorization: `${n.get(l)}`
                            },
                            onUploadChange: (o, i)=>{
                                e.deficiencyPhotoUrl = i;
                            }
                        }),
                    giProps: {
                        span: 1
                    }
                },
                {
                    field: "deficiencyPhotoUrlTwoPhoto",
                    label: t("hsqe.auditInspection.vesselInspection.shipVisitReport.attachment"),
                    component: "SingleImageUpload",
                    componentProps: ({ model: e })=>({
                            action: `${a().urlPrefix}/files`,
                            disabled: s.value,
                            headers: {
                                timestamp: new Date().getTime(),
                                authorization: `${n.get(l)}`
                            },
                            onUploadChange: (o, i)=>{
                                e.deficiencyPhotoUrlTwo = i;
                            }
                        }),
                    giProps: {
                        span: 1
                    }
                },
                {
                    field: "deficiencyPhotoUrlThreePhoto",
                    label: t("hsqe.auditInspection.vesselInspection.shipVisitReport.attachment"),
                    component: "SingleImageUpload",
                    componentProps: ({ model: e })=>({
                            action: `${a().urlPrefix}/files`,
                            disabled: s.value,
                            headers: {
                                timestamp: new Date().getTime(),
                                authorization: `${n.get(l)}`
                            },
                            onUploadChange: (o, i)=>{
                                e.deficiencyPhotoUrlThree = i;
                            }
                        }),
                    giProps: {
                        span: 1
                    }
                }
            ],
            methodsFsc: {
                setReadOnly: (e)=>{
                    s.value = e;
                },
                setReportType: (e)=>{
                    p.value = e;
                },
                setDefectList: (e)=>{
                    g.value = e.list;
                }
            }
        };
    };
});
export { S as c, __tla };
