import { bk as de, r as Z, V as ee, l as e, d as ce, f as be, e as me, a4 as V, bl as W, aw as ve, c as f, o as c, w as t, h as $, F as z, j as a, D as M, W as fe, H as je, i as L, aI as Pe, p as T, A as j, B as De, ca as I, gW as x, gX as k, ee as we, ch as ge, aA as _e, cC as he, X as ye, ac as G, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as H } from "./BasicForm-dL_oCSPM.js";
import { u as J } from "./useForm-CKmgcynv.js";
import { u as Te } from "./useTags-C1thGhjF.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.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 "./vuedraggable.umd-Co2xEC3p.js";
import { H as qe, __tla as __tla_2 } from "./index-8tHZJCCW.js";
import "./schemas-BmKi-UM9.js";
import "./props-CLtNejQT.js";
import { r as Ce } from "./jobPlanDetails-5wu16ZE_.js";
import { t as Ne, P as Re, j as Ue, y as A, a as Ie, e as X, d as Y, b as xe, __tla as __tla_3 } from "./helper-DaqlySQD.js";
import { f as ke } from "./find-D_h_aJYR.js";
import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-BkHA5oZS.js";
import { h as P } from "./head-aneRfQQJ.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./componentSetting-DVhNDBTO.js";
import "./ImageUpload-DUsnro3W.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./tabsView-BXskTdVh.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";
import "./propTypes-CebMRUpe.js";
import "./BasicSelect-C_uwzMkE.js";
import "./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";
import "./dictionary-BRse4lkf.js";
import "./index-DkvzUEqh.js";
import "./index-kKnqLkWM.js";
import "./AutoComplete-Dv1Bqed4.js";
import "./TreeSelect-BZh2DeCh.js";
import "./usePageCache-DluHn7Yy.js";
import "./jobOrder-CGbsc7bp.js";
import "./has-CjqcrIOV.js";
import "./componentMap-CElCaWis.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./useModal-CO65vga3.js";
import "./TimelineItem-Bkds7ZW8.js";
import "./Flex-CTSf12gq.js";
import "./memoize-C3Z21RQJ.js";
import "./template-rpthWlT9.js";
import "./equipmentMainLibrary-bJTzj5mC.js";
import "./findIndex-BgUIH3i1.js";
import "./toInteger-DQeH-nF-.js";
let Sl;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_3;
        } catch  {}
    })()
]).then(async ()=>{
    const s = Ne, r = de(), { t: l } = ee();
    function K({ equipmentCode: p, isInitial: D }) {
        const w = Z(!1);
        return [
            {
                field: "shipId",
                hidden: !0
            },
            {
                field: "jobTitle",
                component: "NInput",
                label: l("jobPlan.viewDetails.jobDetailsTab.jobTitle"),
                componentProps: {
                    disabled: !0,
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.jobTitle")
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.jobTitleRequired"),
                        trigger: [
                            "submit"
                        ]
                    }
                ]
            },
            {
                field: "jobCode",
                component: "NInput",
                label: l("jobPlan.viewDetails.jobDetailsTab.jobCode"),
                componentProps: {
                    disabled: !0,
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.jobCode")
                }
            },
            {
                field: "equipmentCode",
                component: "NInput",
                label: l("jobPlan.viewDetails.jobDetailsTab.equipmentCode"),
                componentProps: {
                    disabled: !0,
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.equipmentCode")
                }
            },
            {
                field: "equipmentName",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.equipmentName"),
                componentProps: ({ model: g, formAction: C })=>{
                    const { shipId: N, jobCode: u } = g, { setFieldsValue: R } = C;
                    return {
                        show: e(w),
                        remote: !0,
                        clearable: !0,
                        filterable: !0,
                        loading: e(xe),
                        options: e(X),
                        valueField: "label",
                        placeholder: l("common.inputTextToSearch"),
                        onClear: ()=>{
                            Y({
                                shipId: N,
                                code: e(p)
                            });
                        },
                        onBlur: ()=>{
                            w.value = !1;
                        },
                        onSearch: async (h)=>{
                            h.length > 0 ? w.value = !0 : w.value = !1, Y({
                                shipId: N,
                                productName: h,
                                code: e(p)
                            });
                        },
                        onUpdateValue: async (h)=>{
                            const y = ke(e(X), {
                                label: h
                            });
                            R({
                                equipmentCode: y?.raw?.productCode ?? null,
                                model: y?.raw?.model ?? null,
                                belongToModel: y?.raw?.belongToModel ?? null,
                                serialNumber: y?.raw?.serialNumber ?? null
                            }), w.value = !1;
                        }
                    };
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.equipmentNameRequired"),
                        trigger: [
                            "submit"
                        ]
                    }
                ]
            },
            {
                field: "model",
                hidden: !0
            },
            {
                field: "belongToModel",
                hidden: !0
            },
            {
                field: "serialNumber",
                hidden: !0
            },
            {
                field: "department",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.department"),
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.department"),
                    labelField: r.getLocale === "en" ? "labelEn" : "label",
                    options: [
                        {
                            label: "甲板部",
                            labelEn: "Deck Department",
                            value: 1
                        },
                        {
                            label: "机舱部",
                            labelEn: "Engine Department",
                            value: 2
                        }
                    ]
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.departmentRequired")
                    }
                ]
            },
            {
                field: "pic",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.picDiscipline"),
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.picDiscipline"),
                    labelField: r.getLocale === "en" ? "labelEn" : "label",
                    options: Re
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.picDisciplineRequired")
                    }
                ]
            },
            {
                field: "jobPriority",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.jobPriority"),
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.jobPriority"),
                    labelField: r.getLocale === "en" ? "labelEn" : "label",
                    options: Ue
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.jobPriorityRequired")
                    }
                ]
            },
            {
                field: "criticalToSafety",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.criticalToSafety"),
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.criticalToSafety"),
                    labelField: r.getLocale === "en" ? "labelEn" : "label",
                    options: A
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.criticalToSafetyRequired")
                    }
                ]
            },
            {
                field: "jobInterval",
                component: "NInputNumber",
                label: l("jobPlan.viewDetails.jobDetailsTab.interval"),
                slot: "jobInterval",
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.interval")
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.intervalRequired")
                    }
                ]
            },
            {
                field: "frequency",
                hidden: !0
            },
            {
                field: "alertPeriod",
                component: "NInputNumber",
                label: l("jobPlan.viewDetails.jobDetailsTab.alertPeriod"),
                slot: "alertPeriod",
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.alertPeriod")
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.alertPeriodRequired")
                    }
                ]
            },
            {
                field: "alertFrequency",
                hidden: !0
            },
            {
                field: "cyclingPattern",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.cyclingPattern"),
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.cyclingPattern"),
                    labelField: r.getLocale === "en" ? "labelEn" : "label",
                    options: Ie
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.cyclingPatternRequired")
                    }
                ]
            },
            {
                field: "workPermit",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.workPermit"),
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.workPermit"),
                    labelField: r.getLocale === "en" ? "labelEn" : "label",
                    options: A
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.workPermitRequired")
                    }
                ]
            },
            {
                field: "rARequired",
                component: "NSelect",
                label: l("jobPlan.viewDetails.jobDetailsTab.raRequired"),
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.raRequired"),
                    labelField: r.getLocale === "en" ? "labelEn" : "label",
                    options: A
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.raRequiredRequired")
                    }
                ]
            },
            {
                field: "estimateTime",
                label: l("jobPlan.viewDetails.jobDetailsTab.estimatedTime"),
                slot: "estimateTime",
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.estimatedTime")
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.estimatedTimeRequired")
                    }
                ]
            },
            {
                field: "estimateTimeUnit",
                hidden: !0
            },
            {
                field: "estimateWorkforce",
                component: "NInputNumber",
                label: l("jobPlan.viewDetails.jobDetailsTab.estimatedWorkforce"),
                componentProps: {
                    min: 0,
                    precision: 0,
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.estimatedWorkforce")
                },
                rules: [
                    {
                        required: !0,
                        message: l("jobPlan.viewDetails.jobDetailsTab.estimatedWorkforceRequired")
                    }
                ]
            },
            {
                field: "tolerance",
                component: "NInputNumber",
                label: l("jobPlan.viewDetails.jobDetailsTab.tolerance"),
                slot: "tolerance",
                componentProps: {
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.tolerance")
                }
            },
            {
                field: "toleranceUnit",
                hidden: !0
            },
            {
                field: "jobDescription",
                component: "NInput",
                label: l("jobPlan.viewDetails.jobDetailsTab.jobDescription"),
                giProps: {
                    span: 2
                },
                componentProps: {
                    type: "textarea",
                    autosize: {
                        minRows: 6,
                        maxRows: 6
                    },
                    showCount: !0,
                    maxlength: 1e3,
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.jobDescription")
                }
            },
            {
                field: "specialNote",
                component: "NInput",
                label: l("jobPlan.viewDetails.jobDetailsTab.specialNote"),
                giProps: {
                    span: 2
                },
                componentProps: {
                    type: "textarea",
                    autosize: {
                        minRows: 6,
                        maxRows: 6
                    },
                    showCount: !0,
                    maxlength: 1e3,
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.specialNote")
                }
            },
            {
                field: "adjustedContent",
                component: "NInput",
                hidden: D,
                label: l("jobPlan.viewDetails.jobDetailsTab.approveAdjustedContent"),
                giProps: {
                    span: 2
                },
                componentProps: {
                    type: "textarea",
                    autosize: {
                        minRows: 1,
                        maxRows: 3
                    },
                    placeholder: l("jobPlan.viewDetails.jobDetailsTab.approveAdjustedContent")
                }
            }
        ];
    }
    const Fe = {
        VIEW: "view"
    }, Se = !1;
    function Q(p) {
        return p ? {
            ...p,
            cyclingPattern: p.cyclingPattern ? p.cyclingPattern + "" : null,
            jobPriority: p.jobPriority ? p.jobPriority + "" : null
        } : {};
    }
    let Me, Le, Ae;
    Me = {
        class: "text-[18px]",
        style: {
            fontWeight: "var(--n-title-font-weight)"
        }
    };
    Le = {
        class: "text-[16px]",
        style: {
            fontWeight: "var(--n-title-font-weight)"
        }
    };
    Ae = {
        class: "text-[16px]",
        style: {
            fontWeight: "var(--n-title-font-weight)"
        }
    };
    Sl = ce({
        __name: "index",
        setup (p) {
            const { t: D } = ee(), { closeCurrent: w } = Te(), g = be(), C = me(), N = V(()=>g.query?.type === Fe.VIEW), u = Z(null), R = V(()=>u.value?.newPlan?.equipmentCode || ""), h = K({
                equipmentCode: R,
                isInitial: !0
            }), y = K({
                equipmentCode: R,
                isInitial: !1
            }), E = W("approvalModalRef"), O = W("historyModal"), [le, { setFieldsValue: ae }] = J({
                gridProps: {
                    cols: "5"
                },
                schemas: h,
                labelPlacement: "top",
                showAdvancedButton: !1,
                showActionButtonGroup: !1
            }), [te, { setFieldsValue: oe }] = J({
                gridProps: {
                    cols: "5"
                },
                schemas: y,
                labelPlacement: "top",
                showAdvancedButton: !1,
                showActionButtonGroup: !1
            });
            function ne() {
                E.value?.handleOpenModal({
                    type: "pass"
                });
            }
            function ie() {
                E.value?.handleOpenModal({
                    type: "reject"
                });
            }
            function se() {
                O.value?.handleOpenModal();
            }
            function B() {
                const d = "PMS_jobPlan", q = g.query?.sourceRouteName;
                try {
                    w(), q && G(()=>{
                        C.replace({
                            name: q
                        });
                    });
                } catch (_) {
                    console.warn("Error closing tab:", _), G(()=>{
                        C.replace({
                            name: d
                        });
                    });
                }
            }
            async function re() {
                if (!g.query.id) return;
                const d = await Ce(g.query.id);
                u.value = d, ae(Q(d?.initialPlan)), oe(Q({
                    adjustedContent: d?.adjustedContent,
                    ...d?.newPlan
                }));
            }
            return ve(()=>{
                re();
            }), (d, q)=>{
                const _ = De, U = Pe, F = je, S = fe, b = ge, m = _e, v = we, ue = he, pe = ye;
                return c(), f(pe, null, {
                    default: t(()=>[
                            e(g).query.id ? (c(), $(z, {
                                key: 0
                            }, [
                                a(S, {
                                    bordered: !1,
                                    class: "proCard"
                                }, {
                                    default: t(()=>[
                                            a(F, {
                                                justify: "space-between"
                                            }, {
                                                default: t(()=>[
                                                        a(F, null, {
                                                            default: t(()=>[
                                                                    a(U, {
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: t(()=>[
                                                                                a(_, {
                                                                                    type: "text",
                                                                                    class: "size-7",
                                                                                    onClick: B
                                                                                }, {
                                                                                    icon: t(()=>[
                                                                                            (c(), f(I(e(x)(e(k).back, "text-[14px]"))))
                                                                                        ]),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: t(()=>[
                                                                                T(" " + j(e(D)("common.backText")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    }),
                                                                    L("h1", Me, j(e(D)("common.menu.jobPlanEditApprove")), 1)
                                                                ]),
                                                            _: 1
                                                        }),
                                                        a(F, null, {
                                                            default: t(()=>[
                                                                    !e(N) && e(Se) ? (c(), $(z, {
                                                                        key: 0
                                                                    }, [
                                                                        a(U, {
                                                                            trigger: "hover"
                                                                        }, {
                                                                            trigger: t(()=>[
                                                                                    a(_, {
                                                                                        type: "primary",
                                                                                        strong: "",
                                                                                        bordered: "",
                                                                                        secondary: "",
                                                                                        class: "size-7",
                                                                                        onClick: ne
                                                                                    }, {
                                                                                        icon: t(()=>[
                                                                                                (c(), f(I(e(x)(e(k).approve, "text-[#0ec06a]"))))
                                                                                            ]),
                                                                                        _: 1
                                                                                    })
                                                                                ]),
                                                                            default: t(()=>[
                                                                                    T(" " + j(e(D)("jobPlan.viewDetails.btnApprove")), 1)
                                                                                ]),
                                                                            _: 1
                                                                        }),
                                                                        a(U, {
                                                                            trigger: "hover"
                                                                        }, {
                                                                            trigger: t(()=>[
                                                                                    a(_, {
                                                                                        type: "primary",
                                                                                        strong: "",
                                                                                        bordered: "",
                                                                                        secondary: "",
                                                                                        class: "size-7",
                                                                                        onClick: ie
                                                                                    }, {
                                                                                        icon: t(()=>[
                                                                                                (c(), f(I(e(x)(e(k).returned, "text-[#0ec06a]"))))
                                                                                            ]),
                                                                                        _: 1
                                                                                    })
                                                                                ]),
                                                                            default: t(()=>[
                                                                                    T(" " + j(e(D)("jobPlan.viewDetails.btnReject")), 1)
                                                                                ]),
                                                                            _: 1
                                                                        })
                                                                    ], 64)) : M("", !0),
                                                                    a(U, {
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: t(()=>[
                                                                                a(_, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    bordered: "",
                                                                                    secondary: "",
                                                                                    class: "size-7",
                                                                                    onClick: se
                                                                                }, {
                                                                                    icon: t(()=>[
                                                                                            (c(), f(I(e(x)(e(k).log, "text-[#0ec06a]"))))
                                                                                        ]),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: t(()=>[
                                                                                T(" " + j(e(D)("jobPlan.viewDetails.history")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })
                                                                ]),
                                                            _: 1
                                                        })
                                                    ]),
                                                _: 1
                                            })
                                        ]),
                                    _: 1
                                }),
                                a(S, {
                                    bordered: !1,
                                    class: "proCard mt-2"
                                }, {
                                    header: t(()=>[
                                            L("span", Le, j(d.$t("jobPlan.editApprove.initialJobPlanDetail")), 1)
                                        ]),
                                    default: t(()=>[
                                            a(e(H), {
                                                onRegister: e(le),
                                                disabled: ""
                                            }, {
                                                jobInterval: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.frequency,
                                                                        "onUpdate:value": (n)=>o.frequency = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                alertPeriod: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.alertFrequency,
                                                                        "onUpdate:value": (n)=>o.alertFrequency = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                estimateTime: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.estimateTimeUnit,
                                                                        "onUpdate:value": (n)=>o.estimateTimeUnit = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                tolerance: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.toleranceUnit,
                                                                        "onUpdate:value": (n)=>o.toleranceUnit = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                _: 1
                                            }, 8, [
                                                "onRegister"
                                            ])
                                        ]),
                                    _: 1
                                }),
                                a(S, {
                                    bordered: !1,
                                    class: "proCard mt-2"
                                }, {
                                    header: t(()=>[
                                            L("span", Ae, j(d.$t("jobPlan.editApprove.newJobPlanDetail")), 1)
                                        ]),
                                    default: t(()=>[
                                            a(e(H), {
                                                onRegister: e(te),
                                                disabled: ""
                                            }, {
                                                jobInterval: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.frequency,
                                                                        "onUpdate:value": (n)=>o.frequency = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                alertPeriod: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.alertFrequency,
                                                                        "onUpdate:value": (n)=>o.alertFrequency = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                estimateTime: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.estimateTimeUnit,
                                                                        "onUpdate:value": (n)=>o.estimateTimeUnit = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                tolerance: t(({ model: o, field: i })=>[
                                                        a(v, null, {
                                                            default: t(()=>[
                                                                    a(b, {
                                                                        class: "w-full",
                                                                        value: o[i],
                                                                        "onUpdate:value": (n)=>o[i] = n,
                                                                        min: 0,
                                                                        precision: 0
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value"
                                                                    ]),
                                                                    a(m, {
                                                                        value: o.toleranceUnit,
                                                                        "onUpdate:value": (n)=>o.toleranceUnit = n,
                                                                        "label-field": e(r).getLocale === "en" ? "labelEn" : "label",
                                                                        "default-value": e(P)(e(s))?.value,
                                                                        options: e(s),
                                                                        style: {
                                                                            width: "140px"
                                                                        },
                                                                        placeholder: ""
                                                                    }, null, 8, [
                                                                        "value",
                                                                        "onUpdate:value",
                                                                        "label-field",
                                                                        "default-value",
                                                                        "options"
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                _: 1
                                            }, 8, [
                                                "onRegister"
                                            ])
                                        ]),
                                    _: 1
                                }),
                                e(u) ? (c(), f(Ee, {
                                    key: 0,
                                    ref_key: "approvalModalRef",
                                    ref: E,
                                    busId: e(u)?.busId,
                                    busNo: e(u)?.busNo,
                                    moduleCode: e(u)?.moduleCode,
                                    subModuleCode: e(u)?.subModuleCode
                                }, null, 8, [
                                    "busId",
                                    "busNo",
                                    "moduleCode",
                                    "subModuleCode"
                                ])) : M("", !0),
                                e(u) ? (c(), f(e(qe), {
                                    key: 1,
                                    ref_key: "historyModal",
                                    ref: O,
                                    busId: e(u)?.busId,
                                    moduleCode: e(u)?.moduleCode,
                                    subModuleCode: e(u)?.subModuleCode
                                }, null, 8, [
                                    "busId",
                                    "moduleCode",
                                    "subModuleCode"
                                ])) : M("", !0)
                            ], 64)) : (c(), f(ue, {
                                key: 1,
                                size: "huge"
                            }, {
                                extra: t(()=>[
                                        a(_, {
                                            type: "primary",
                                            onClick: B
                                        }, {
                                            default: t(()=>[
                                                    T(j(d.$t("common.back")), 1)
                                                ]),
                                            _: 1
                                        })
                                    ]),
                                default: t(()=>[
                                        q[0] || (q[0] = T(" Required parameters are missing. Please provide the necessary query parameters (e.g. id) and try again. "))
                                    ]),
                                _: 1
                            }))
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Sl as default, __tla };
