import { V as p, bk as d, gL as u, d as f, r as j, aw as I, c as g, o as y, w as _, i as e, j as x, A as N, l, X as D, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as v } from "./seaconLogo-CQwr8ZvW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";
import "./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";
import "./index-DkvzUEqh.js";
import { __tla as __tla_1 } from "./index.vue_vue_type_style_index_0_scoped_b974e5ec_lang-_0QwzFKM.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./print-CT_2hrjP.js";
import "./schemas-BmKi-UM9.js";
import { B as S, __tla as __tla_2 } from "./index-DPn-8SNy.js";
import "./props-CLtNejQT.js";
import { g as w } from "./jobPlan-DTKoW_aS.js";
import { r as h } from "./dictUtils-D8jA3mBt.js";
import "./componentSetting-DVhNDBTO.js";
import "./propTypes-CebMRUpe.js";
import "./index-kKnqLkWM.js";
import "./jobOrder-CGbsc7bp.js";
import "./has-CjqcrIOV.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./componentMap-CElCaWis.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
let io;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })()
]).then(async ()=>{
    const s = d(), { t: o } = p(), L = await u("eq_location");
    function C() {
        return [
            {
                title: o("jobPlan.jobPlanPrintItem.vesselInfo"),
                class: "bg-gray-100 py-4 px-6 mb-4 ",
                column: 3,
                componentProps: {},
                descriptions: [
                    {
                        label: o("jobPlan.jobPlanPrintItem.vesselName"),
                        field: s.getLocale === "en" ? "shipNameEn" : "shipName",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.imo"),
                        field: "imo",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.managementCompany"),
                        field: s.getLocale === "en" ? "companyNameEn" : "companyName",
                        span: 1,
                        componentProps: {}
                    }
                ]
            },
            {
                title: o("jobPlan.jobPlanPrintItem.productInfo"),
                class: "bg-gray-100 py-4 px-6 mb-4",
                column: 3,
                componentProps: {},
                descriptions: [
                    {
                        label: o("jobPlan.jobPlanPrintItem.productLabel"),
                        field: "equipmentName",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.brand"),
                        field: "maker",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.productType"),
                        field: "model",
                        span: 1,
                        componentProps: {},
                        customRender: (n)=>n.model ? n.model.includes("default") ? "" : n.model : ""
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.serialNo"),
                        field: "serialNumber",
                        span: 1,
                        componentProps: {},
                        customRender: (n)=>n.serialNo && n.serialNo.split("_")[0] !== "default" ? n.serialNo : ""
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.builder"),
                        field: "builderLicense",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.location"),
                        field: "location",
                        span: 1,
                        componentProps: {},
                        customRender: (n)=>h(L, n.location)
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.runningHours"),
                        field: "runningHours",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.timeSinceLastJob"),
                        field: "timeSinceLastJob",
                        span: 1,
                        componentProps: {}
                    }
                ]
            },
            {
                title: o("jobPlan.jobPlanPrintItem.activityInfo"),
                class: "bg-gray-100 py-4 px-6 mb-4",
                column: 4,
                componentProps: {},
                descriptions: [
                    {
                        label: o("jobPlan.jobPlanPrintItem.JobTitle"),
                        field: "jobTitle",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.jobCode"),
                        field: "jobCode",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.internal"),
                        field: "jobInterval",
                        span: 1,
                        componentProps: {},
                        customRender (n) {
                            return n.jobInterval ? `${n.jobInterval} ${n.frequencyNameEn}` : void 0;
                        }
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.pic"),
                        field: "picNameEn",
                        span: 1,
                        componentProps: {}
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.criticalToSafety"),
                        field: "criticalToSafety",
                        span: 4,
                        componentProps: {},
                        customRender (n) {
                            return n.criticalToSafety ? o("common.yes") : o("common.no");
                        }
                    },
                    {
                        label: o("jobPlan.jobPlanPrintItem.specialNote"),
                        field: "specialNote",
                        span: 4,
                        componentProps: {}
                    }
                ]
            },
            {
                title: o("jobPlan.jobPlanPrintItem.jobDescription"),
                class: "bg-gray-100 py-4 px-6 mb-2",
                column: 1,
                componentProps: {},
                descriptions: [
                    {
                        label: "",
                        span: 1,
                        field: "jobDescription",
                        componentProps: {}
                    }
                ]
            }
        ];
    }
    let T, k;
    T = {
        class: "home-wrapper flex justify-between"
    };
    k = {
        class: "text-3xl font-bold flex items-center ml-6"
    };
    io = f({
        __name: "index",
        props: {
            componentData: {}
        },
        setup (n) {
            const r = n, { t: m } = p(), c = C(), i = j();
            async function b() {
                try {
                    const t = await w(r.componentData.id);
                    i.value = t;
                } catch (t) {
                    console.error("Failed to fetch print data:", t);
                }
            }
            return I(()=>{
                b();
            }), (t, a)=>{
                const P = D;
                return y(), g(P, null, {
                    default: _(()=>[
                            e("div", T, [
                                e("h2", k, N(l(m)("jobPlan.jobPlanPrintItem.PMSJobCard")), 1),
                                a[0] || (a[0] = e("div", {
                                    class: "logo-wrapper"
                                }, [
                                    e("img", {
                                        class: "w-[140px]",
                                        src: v,
                                        alt: "公司logo"
                                    })
                                ], -1))
                            ]),
                            a[1] || (a[1] = e("div", {
                                class: "w-full flex justify-center"
                            }, [
                                e("div", {
                                    class: "w-[95%] h-[2px] py-0 px-2 mb-0 mt-2 bg-black"
                                })
                            ], -1)),
                            x(l(S), {
                                "data-source": l(i),
                                descriptions: l(c),
                                titleFontSize: "20px"
                            }, null, 8, [
                                "data-source",
                                "descriptions"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { io as default, __tla };
