import { a4 as C, V as _, d as w, eV as T, f as V, r as v, aw as L, h as d, o as c, i as y, j as D, A as u, l as N, ao as F, w as q, F as U, a9 as k, c as A, c6 as E, p as B, ap as M, gD as Y, __tla as __tla_0 } from "./index-9PRMimni.js";
import { i as j, e as G, j as H, k as Z } from "./template-rpthWlT9.js";
import { g as z, a as J } from "./helper-DAsjAERN.js";
let re;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    const { t: e } = _(), r = await j(), n = await G({
        roleType: 2,
        roleCategory: 1
    }), l = await H(), R = C(()=>[
            {
                field: "reportNo",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.relatedReportNo")
            },
            {
                field: "severity",
                label: e("hsqe.deficiency.servity"),
                options: r
            },
            {
                field: "deficiencyCode",
                label: e("hsqe.deficiency.deficiencyCode")
            },
            {
                field: "equipmentName",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.equipment")
            },
            {
                field: "equipmentValue",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.criticalEquipment"),
                options: [
                    {
                        label: e("common.yes"),
                        value: "1"
                    },
                    {
                        label: e("common.no"),
                        value: "0"
                    }
                ]
            },
            {
                field: "expirationTime",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.expiryDate")
            },
            {
                field: "vesselPositionCode",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.vesselResponsible"),
                options: n,
                defualtLabelField: "name"
            },
            {
                field: "officePositionCode",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible"),
                options: l,
                defualtLabelField: "name"
            },
            {
                field: "basicDescription",
                label: e("hsqe.cdi.description")
            },
            {
                field: "deficiencyPhotoUrlPhoto",
                label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
                type: "image",
                ifShow: ({ row: i, field: t })=>i?.[t]
            },
            {
                field: "deficiencyPhotoUrlTwoPhoto",
                label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
                type: "image",
                ifShow: ({ row: i, field: t })=>i?.[t]
            },
            {
                field: "deficiencyPhotoUrlThreePhoto",
                label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
                type: "image",
                ifShow: ({ row: i, field: t })=>i?.[t]
            }
        ]), K = [
        {
            field: "reportNo",
            label: e("hsqe.psc.relatedReportNo")
        },
        {
            field: "severity",
            label: e("hsqe.psc.servity"),
            options: r
        },
        {
            field: "defectCode",
            label: e("hsqe.psc.mouDeficiencyCode")
        },
        {
            field: "actionCode",
            label: e("hsqe.psc.pSCActionCode")
        },
        {
            field: "equipmentName",
            label: e("hsqe.psc.equipment")
        },
        {
            field: "equipmentValue",
            label: e("hsqe.psc.criticalEquipment")
        },
        {
            field: "expirationTime",
            label: e("hsqe.psc.dateToRectify")
        },
        {
            field: "vesselPositionCode",
            label: e("hsqe.psc.vesselResponsible"),
            options: n,
            defualtLabelField: "name"
        },
        {
            field: "officePositionCode",
            label: e("hsqe.psc.officeResponsible"),
            options: l,
            defualtLabelField: "name"
        },
        {
            field: "deficiencyPhotoUrlPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlTwoPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlThreePhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "basicDescription",
            label: e("hsqe.auditInspection.vesselInspection.deficiency.description")
        }
    ], O = [
        {
            field: "reportNo",
            label: e("hsqe.deficiency.reportNo")
        },
        {
            field: "severity",
            label: e("hsqe.deficiency.servity"),
            options: r
        },
        {
            field: "expirationTime",
            label: e("hsqe.rs.expirationTime")
        },
        {
            field: "vesselPositionCode",
            label: e("hsqe.psc.vesselResponsible"),
            options: n,
            defualtLabelField: "name"
        },
        {
            field: "officePositionCode",
            label: e("hsqe.psc.officeResponsible"),
            options: l,
            defualtLabelField: "name"
        },
        {
            field: "basicDescription",
            label: e("hsqe.auditInspection.vesselInspection.deficiency.description")
        },
        {
            field: "deficiencyPhotoUrlPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlTwoPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlThreePhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        }
    ], Q = [
        {
            field: "reportNo",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.relatedReportNo")
        },
        {
            field: "findingSectionCode",
            label: e("hsqe.cdi.findingsSection")
        },
        {
            field: "findingCode",
            label: e("hsqe.cdi.findingsCode")
        },
        {
            field: "expirationTime",
            label: e("hsqe.cdi.expirationTime")
        },
        {
            field: "vesselPositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.vesselResponsible"),
            options: n,
            defualtLabelField: "name"
        },
        {
            field: "officePositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible"),
            options: l,
            defualtLabelField: "name"
        },
        {
            field: "basicDescription",
            label: e("hsqe.cdi.description")
        }
    ], W = [
        {
            field: "reportNo",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.relatedReportNo")
        },
        {
            field: "findingSectionCode",
            label: e("hsqe.cdi.findingsSection")
        },
        {
            field: "findingCode",
            label: e("hsqe.cdi.findingsChild")
        },
        {
            field: "expirationTime",
            label: e("hsqe.cdi.expirationTime")
        },
        {
            field: "vesselPositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.vesselResponsible"),
            options: n,
            defualtLabelField: "name"
        },
        {
            field: "officePositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible"),
            options: l,
            defualtLabelField: "name"
        },
        {
            field: "deficiencyPhotoUrlPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlTwoPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlThreePhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "basicDescription",
            label: e("hsqe.cdi.description")
        }
    ], X = [
        {
            field: "reportNo",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.relatedReportNo")
        },
        {
            field: "findingSectionCode",
            label: e("hsqe.cdi.findingsSection")
        },
        {
            field: "findingCode",
            label: e("hsqe.cdi.findingsChild")
        },
        {
            field: "expirationTime",
            label: e("hsqe.cdi.expirationTime")
        },
        {
            field: "vesselPositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.vesselResponsible"),
            options: n,
            defualtLabelField: "name"
        },
        {
            field: "officePositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible"),
            options: l,
            defualtLabelField: "name"
        },
        {
            field: "deficiencyPhotoUrlPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlTwoPhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "deficiencyPhotoUrlThreePhoto",
            label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationPhoto"),
            type: "image",
            ifShow: ({ row: i, field: t })=>i[t]
        },
        {
            field: "basicDescription",
            label: e("hsqe.cdi.description")
        }
    ], $ = [
        {
            field: "reportNo",
            label: e("hsqe.deficiency.reportNo")
        },
        {
            field: "severity",
            label: e("hsqe.deficiency.servity"),
            options: r
        },
        {
            field: "equipmentName",
            label: e("hsqe.psc.equipment")
        },
        {
            field: "equipmentValue",
            label: e("hsqe.psc.criticalEquipment")
        },
        {
            field: "expirationTime",
            label: e("hsqe.cdi.expirationTime")
        },
        {
            field: "vesselPositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.vesselResponsible"),
            options: n,
            defualtLabelField: "name"
        },
        {
            field: "officePositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible"),
            options: l,
            defualtLabelField: "name"
        },
        {
            field: "basicDescription",
            label: e("hsqe.cdi.description")
        }
    ], f = [
        {
            field: "reportNo",
            label: e("hsqe.deficiency.reportNo")
        },
        {
            field: "severity",
            label: e("hsqe.deficiency.servity"),
            options: r
        },
        {
            field: "equipmentName",
            label: e("hsqe.psc.equipment")
        },
        {
            field: "equipmentValue",
            label: e("hsqe.psc.criticalEquipment")
        },
        {
            field: "expirationTime",
            label: e("hsqe.psc.dateToRectify")
        },
        {
            field: "vesselPositionCode",
            label: e("hsqe.psc.vesselResponsible"),
            options: n,
            defualtLabelField: "name"
        },
        {
            field: "officePositionCode",
            label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible"),
            options: l,
            defualtLabelField: "name"
        },
        {
            field: "basicDescription",
            label: e("hsqe.cdi.description")
        }
    ], ee = {
        Superintendent: R.value,
        PSC: K,
        FSC: O,
        RS: Q,
        SIRE: W,
        CDI: X,
        ManagementInspection: $,
        navigationAudit: f,
        engineeringAudit: f,
        Bunkering: f,
        mooringAudit: f,
        cargoAudit: f
    };
    function ie(i) {
        return i ? ee[i] : R.value;
    }
    let te, oe, se, ne, le, ae, ce;
    te = {
        class: "pt-[23px] pb-[25px] border-b-[1px] border-solid border-[#000]",
        "label-class": "text-[16px] text-[#000]",
        "content-class": "text-[16px] text-[#676767]"
    };
    oe = {
        class: "flex flex-col gap-y-[17px] font-semibold mb-[17px]"
    };
    se = {
        class: "text-[18px] text-[#191919] inline-block"
    };
    ne = {
        key: 0
    };
    le = [
        "src"
    ];
    ae = {
        key: 1
    };
    ce = {
        key: 2
    };
    re = w({
        __name: "BasicInfo",
        props: {
            templateDataList: {}
        },
        setup (i) {
            const { t } = T(), P = V(), S = i, m = v(null), p = v();
            function I(s) {
                return typeof s.ifShow == "function" ? s.ifShow({
                    row: p.value,
                    field: s.field
                }) : s.hidden || !0;
            }
            async function g() {
                m.value = ie(P.query.name);
                const s = S.templateDataList;
                let a;
                s.equipmentId && (a = await Z(s.equipmentId)), p.value = {
                    ...s,
                    equipmentName: a?.productName || "",
                    expirationTime: Y(s.expirationTime).format("YYYY-MM-DD")
                };
            }
            function x(s, a, b = "label") {
                if (!a) return "";
                const h = s.find((o)=>o.value === a || o.code === a);
                return b === "label" ? z(h) : J(h);
            }
            return L(()=>{
                g();
            }), (s, a)=>{
                const b = M, h = F;
                return c(), d("div", te, [
                    y("header", oe, [
                        y("label", se, u(N(t)("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.causeAnalysis.basic")), 1)
                    ]),
                    D(h, {
                        "label-placement": "top",
                        "label-class": "text-[16px] w-[200px] text-[#000]",
                        "content-class": "text-[14px] w-[200px] text-[#676767]"
                    }, {
                        default: q(()=>[
                                (c(!0), d(U, null, k(m.value, (o)=>(c(), A(b, {
                                        key: o.field,
                                        span: o.span || 1
                                    }, E({
                                        default: q(()=>[
                                                o.type === "image" && I(o) ? (c(), d("div", ne, [
                                                    y("img", {
                                                        class: "w-[80px] h-[80px]",
                                                        src: p.value?.[o?.field]
                                                    }, null, 8, le)
                                                ])) : o?.options ? (c(), d("div", ce, u(x(o?.options, p.value?.[o?.field] || void 0, o?.defualtLabelField)), 1)) : (c(), d("div", ae, u(p.value?.[o?.field]), 1))
                                            ]),
                                        _: 2
                                    }, [
                                        I(o) ? {
                                            name: "label",
                                            fn: q(()=>[
                                                    B(u(o.label), 1)
                                                ]),
                                            key: "0"
                                        } : void 0
                                    ]), 1032, [
                                        "span"
                                    ]))), 128))
                            ]),
                        _: 1
                    })
                ]);
            };
        }
    });
});
export { re as _, __tla };
