import { _ as f, __tla as __tla_0 } from "./CustomCard.vue_vue_type_script_setup_true_lang-374ERk20.js";
import { _ as P } from "./CustomTable.vue_vue_type_script_setup_true_lang-CVzOsXR0.js";
import { c as _ } from "./columns-1dSLzo5A.js";
import { p as y } from "./workbench-DEgqNpqd.js";
import { d as g, e as I, r as m, ay as T, ac as n, c as b, o as k, w as C, j as A, l as r, __tla as __tla_1 } from "./index-9PRMimni.js";
import "./BasicForm-dL_oCSPM.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 "./vuedraggable.umd-Co2xEC3p.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 "./useForm-CKmgcynv.js";
import "./usePageCache-DluHn7Yy.js";
import "./Flex-CTSf12gq.js";
import "./index-DatBjkM3.js";
import "./dateUtil-BtafrT1f.js";
import "./format-DgF6KtHk.js";
import "./helper-D9DF1oLX.js";
import "./find-D_h_aJYR.js";
import "./findIndex-BgUIH3i1.js";
import "./toInteger-DQeH-nF-.js";
import "./includes-DdMWPj0t.js";
let ie;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    ie = g({
        __name: "PurchaseOrderTracking",
        props: {
            componentItem: {},
            isEditable: {
                type: Boolean
            },
            searchParams: {},
            refreshComponent: {
                type: Boolean
            }
        },
        setup (c) {
            const s = c, t = I(), i = m(), o = m({
                days: 15
            }), { purchaseOrderTrackingColumns: l } = _();
            T(()=>s.refreshComponent, (e)=>{
                n(()=>{
                    e && p(!0);
                });
            }, {
                immediate: !0
            });
            function u(e) {
                return {
                    style: "cursor: pointer",
                    onClick: ()=>{
                        +e.isChanged == 1 ? t.push({
                            name: "Adjust_PMS_AdjustPoPage",
                            query: {
                                type: "view",
                                poId: e.id,
                                canApprove: e.canApprove,
                                canEdit: e.canEdit
                            }
                        }) : t.push({
                            name: "Add_PMS_PolistPage",
                            query: {
                                poId: e.id,
                                type: "view"
                            }
                        });
                    }
                };
            }
            function d() {
                const e = s.searchParams?.shipIds?.toString()?.split(",");
                let a = "";
                e?.length === 1 && (a = e[0]), t.push({
                    name: "PMS_poListPage",
                    query: {
                        shipId: a
                    }
                });
            }
            function h(e) {
                o.value = e, p(!0);
            }
            function p(e) {
                n(()=>{
                    i.value?.handleGetData(e);
                });
            }
            return (e, a)=>(k(), b(f, {
                    componentItem: e.componentItem,
                    cardParams: r(o),
                    "show-transition": !1,
                    onFilter: h,
                    onShowAll: d
                }, {
                    default: C(()=>[
                            A(P, {
                                ref_key: "basicTableRef",
                                ref: i,
                                columns: r(l),
                                request: r(y),
                                params: {
                                    ...e.searchParams || {},
                                    ...r(o) || {}
                                },
                                "row-props": u
                            }, null, 8, [
                                "columns",
                                "request",
                                "params"
                            ])
                        ]),
                    _: 1
                }, 8, [
                    "componentItem",
                    "cardParams"
                ]));
        }
    });
});
export { ie as default, __tla };
