import { r as u, gK as s, R as o, V as S, bk as b, __tla as __tla_0 } from "./index-9PRMimni.js";
let k, d;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    const { t: n } = S(), p = b(), t = u([]);
    let a = "";
    try {
        const l = await s({
            meta: {
                isReturnNativeResponse: !0
            }
        });
        if (l && typeof l == "object" && l.data?.code === o.SUCCESS) switch(a = l.data?.data, a){
            case "1":
                t.value = [
                    {
                        value: "SSB0705  ",
                        label: "散货",
                        labelEn: "Bulk"
                    }
                ];
                break;
            case "2":
                t.value = [
                    {
                        value: "SSB0705Tank",
                        label: "油液",
                        labelEn: "Tanker"
                    }
                ];
                break;
            case "3":
                t.value = [
                    {
                        value: "SSB0705  ",
                        label: "散货",
                        labelEn: "Bulk"
                    },
                    {
                        value: "SSB0705Tank  ",
                        label: "油液",
                        labelEn: "Tanker"
                    }
                ];
        }
    } catch  {
        a = "";
    }
    k = [
        {
            field: "templateCode",
            component: "NSelect",
            label: n("hsqe.certificate.VesselType"),
            componentProps: {
                placeholder: n("hsqe.auditInspection.vesselInspection.formCategoryHint"),
                clearable: !1,
                options: t.value,
                defaultValue: t.value[0].value,
                "value-field": "value",
                "label-field": p.getLocale === "en" ? "labelEn" : "label"
            }
        },
        {
            field: "year",
            label: n("hsqe.auditInspection.vesselInspection.year"),
            component: "NDatePicker",
            componentProps: {
                type: "year"
            }
        }
    ];
    d = function() {
        const l = {
            1: "SSB0705",
            2: "SSB0705Tank"
        }, c = function(e) {
            switch(e){
                case "SSB0705":
                    t.value = [
                        {
                            value: "SSB0705  ",
                            label: "散货",
                            labelEn: "Bulk"
                        }
                    ];
                    break;
                case "SSB0705Tank":
                    t.value = [
                        {
                            value: "SSB0705Tank",
                            label: "油液",
                            labelEn: "Tanker"
                        }
                    ];
                    break;
                case "3":
                    t.value = [
                        {
                            value: "SSB0705  ",
                            label: "散货",
                            labelEn: "Bulk"
                        },
                        {
                            value: "SSB0705Tank  ",
                            label: "油液",
                            labelEn: "Tanker"
                        }
                    ];
            }
        }, r = function() {
            return +a == 2;
        }, i = function() {
            return +a == 1;
        };
        return {
            refreshVisitingType: async function() {
                try {
                    const e = await s({
                        meta: {
                            isReturnNativeResponse: !0
                        }
                    });
                    e && typeof e == "object" && "data" in e && e.data?.code === o.SUCCESS && (a = e.data?.data);
                } catch  {
                    a = "";
                }
            },
            setOptsCategory: c,
            templateCode: l[a],
            isTankerFunc: r,
            isCargoFunc: i
        };
    };
});
export { k as s, d as v, __tla };
