import { _ as E, __tla as __tla_0 } from "./CustomCard.vue_vue_type_script_setup_true_lang-374ERk20.js";
import { _ as V } from "./CustomTable.vue_vue_type_script_setup_true_lang-CVzOsXR0.js";
import { u as z } from "./useECharts-XZ1IwN24.js";
import { c as D } from "./columns-1dSLzo5A.js";
import { b as L, c as $ } from "./workbench-DEgqNpqd.js";
import { d as x, dW as A, bk as O, e as W, V as j, r as s, ay as h, l as t, ac as f, c as C, o as l, w as G, D as b, h as H, __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 "./useTimeout-BxFilWvD.js";
import "./tslib.es6-CSJU3tT9.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 Fe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    Fe = x({
        __name: "CircularFeedbackStatus",
        props: {
            componentItem: {},
            isEditable: {
                type: Boolean
            },
            searchParams: {},
            refreshComponent: {
                type: Boolean
            },
            defaultCardParams: {},
            useSource: {}
        },
        setup (y) {
            const r = y, m = A(), _ = O(), c = W(), { t: k } = j(), u = s(), p = s(), { setOptions: S, getInstance: w, disposeInstance: T, resizeFn: v } = z(p), o = s("chart"), { circularFeedbackStatusColumns: I } = D(), n = s(r.defaultCardParams || {});
            h(()=>r.refreshComponent, (e)=>{
                e && i();
            }, {
                immediate: !0
            }), h(()=>r.isEditable, ()=>{
                o.value === "chart" && v();
            });
            function i() {
                o.value === "table" ? R(!0) : o.value === "chart" && P();
            }
            async function P() {
                const d = (await L({
                    ...r.searchParams || {},
                    ...n.value || {},
                    noticeTypeCode: "notice_circular"
                }) || []).map((a)=>({
                        value: Number(a.amount || 0),
                        name: _.getLocale === "en" ? a?.statusNameEn : a?.statusName,
                        status: a.status,
                        label: {
                            show: +a.status == 1
                        }
                    })), B = {
                    tooltip: {
                        trigger: "item"
                    },
                    legend: {
                        bottom: 0,
                        left: "center"
                    },
                    series: [
                        {
                            type: "pie",
                            radius: [
                                "45%",
                                "60%"
                            ],
                            top: "-8%",
                            label: {
                                formatter: `{percent|{d}%} 
 {title|${k("dashboard.workbench.readPercent")}}`,
                                position: "center",
                                rich: {
                                    percent: {
                                        color: t(m)?.textColor1,
                                        fontSize: 26
                                    },
                                    title: {
                                        color: t(m)?.textColor3,
                                        fontSize: 14,
                                        lineHeight: 30
                                    }
                                }
                            },
                            data: d
                        }
                    ]
                };
                await f(), S(B), w()?.on("click", function(a) {
                    c.push({
                        name: "notice_dispatched",
                        query: {
                            noticeCompletionStatus: a?.data?.status,
                            noticeTypeCode: "notice_circular"
                        }
                    });
                });
            }
            function R(e) {
                f(()=>{
                    u.value?.handleGetData(e);
                });
            }
            function g(e) {
                n.value = e, i();
            }
            function F(e) {
                o.value = e, o.value === "chart" && T(), i();
            }
            function N(e) {
                return {
                    style: "cursor: pointer",
                    onClick: ()=>{
                        c.push({
                            name: "noticeCircular_detail",
                            query: {
                                id: e.noticeInfoId,
                                type: "view"
                            }
                        });
                    }
                };
            }
            function q() {
                c.push({
                    name: "notice_dispatched",
                    query: {
                        noticeTypeCode: "notice_circular"
                    }
                });
            }
            return (e, d)=>(l(), C(E, {
                    componentItem: e.componentItem,
                    currentComponent: t(o),
                    cardParams: t(n),
                    useSource: e.useSource,
                    onFilter: g,
                    onShowAll: q,
                    onTransition: F
                }, {
                    default: G(()=>[
                            t(o) === "table" ? (l(), C(V, {
                                key: 0,
                                ref_key: "basicTableRef",
                                ref: u,
                                columns: t(I),
                                request: t($),
                                params: {
                                    ...e.searchParams || {},
                                    ...t(n) || {},
                                    objectId: e.searchParams?.shipIds,
                                    noticeTypeCode: "notice_circular"
                                },
                                "row-props": N
                            }, null, 8, [
                                "columns",
                                "request",
                                "params"
                            ])) : b("", !0),
                            t(o) === "chart" ? (l(), H("div", {
                                key: 1,
                                ref_key: "chartRef",
                                ref: p,
                                class: "w-full h-full"
                            }, null, 512)) : b("", !0)
                        ]),
                    _: 1
                }, 8, [
                    "componentItem",
                    "currentComponent",
                    "cardParams",
                    "useSource"
                ]));
        }
    });
});
export { Fe as default, __tla };
