import { d as E, V as N, r, c as n, o as a, w as t, j as c, l as e, D as l, H as X, aI as L, p as C, A as h, B as M, ca as k, gW as b, gX as S, X as W, ac as $, __tla as __tla_0 } from "./index-9PRMimni.js";
import { c as j, __tla as __tla_1 } from "./columns-DY6kUOTk.js";
import { B as A } from "./Table-0PViRYCf.js";
let G;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    let F;
    F = {
        name: "CrewContactMethod"
    };
    G = E({
        ...F,
        props: {
            readonly: {
                type: Boolean,
                default: !1
            }
        },
        setup (T, { expose: x }) {
            const { t: u } = N(), B = T, s = r(), i = r([]), o = r(), I = r(B.readonly), d = r([]), p = j(), { methods: { updateIsEditOilTab2: _ } } = p;
            function D() {
                o.value = !0, _(e(o));
            }
            function m() {
                o.value = !1, _(e(o));
            }
            function O() {
                return s.value?.getDataSource();
            }
            async function R(f) {
                m(), i.value = f, d.value = p.CrewContactMethodColumns, $(()=>{
                    s.value?.reload(), s.value?.setBordered(!0), s.value?.setStriped(!1);
                });
            }
            return x({
                handleOpen: R,
                voList: O
            }), (f, g)=>{
                const y = M, v = L, V = X, z = W;
                return a(), n(z, null, {
                    default: t(()=>[
                            c(e(A), {
                                ref_key: "crewTableRef",
                                ref: s,
                                columns: e(d),
                                dataSource: e(i),
                                "row-key": (w)=>w.id,
                                autoScrollX: !0,
                                immediate: !0,
                                pagination: !1,
                                "can-resize": !1,
                                "show-table-setting": !1
                            }, {
                                toolbar: t(()=>[
                                        e(I) ? l("", !0) : (a(), n(V, {
                                            key: 0,
                                            reverse: ""
                                        }, {
                                            default: t(()=>[
                                                    e(o) ? l("", !0) : (a(), n(v, {
                                                        key: 0,
                                                        trigger: "hover"
                                                    }, {
                                                        trigger: t(()=>[
                                                                c(y, {
                                                                    type: "primary",
                                                                    strong: "",
                                                                    bordered: "",
                                                                    secondary: "",
                                                                    class: "size-7",
                                                                    onClick: D
                                                                }, {
                                                                    icon: t(()=>[
                                                                            (a(), n(k(e(b)(e(S).edit))))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        default: t(()=>[
                                                                C(" " + h(e(u)("common.optionsEditText")), 1)
                                                            ]),
                                                        _: 1
                                                    })),
                                                    e(o) ? (a(), n(v, {
                                                        key: 1,
                                                        trigger: "hover"
                                                    }, {
                                                        trigger: t(()=>[
                                                                c(y, {
                                                                    type: "primary",
                                                                    strong: "",
                                                                    bordered: "",
                                                                    secondary: "",
                                                                    class: "size-7",
                                                                    onClick: g[0] || (g[0] = (w)=>m())
                                                                }, {
                                                                    icon: t(()=>[
                                                                            (a(), n(k(e(b)(e(S).save))))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        default: t(()=>[
                                                                C(" " + h(e(u)("common.saveText")), 1)
                                                            ]),
                                                        _: 1
                                                    })) : l("", !0)
                                                ]),
                                            _: 1
                                        }))
                                    ]),
                                _: 1
                            }, 8, [
                                "columns",
                                "dataSource",
                                "row-key"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { G as _, __tla };
