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