import { KettalFunctionAction, KettalPopupAction, TableRow } from '@/types'; import { Ref } from 'vue'; export interface actionType { name: string | undefined; selection: 'single' | 'multiple' | 'none'; rowKey?: string | string[] | undefined; popupName?: string | undefined; title: string; functionName?: string | undefined; link?: string | undefined; type: 'popup' | 'expand' | 'function' | ''; actionSelectionRules?: ((row: TableRow) => boolean) | null; } export default function useTableAction(rowKey: Ref, selected: any, emit: any): { action: Ref<{ name: string | undefined; selection: "single" | "multiple" | "none"; rowKey?: string | string[] | undefined; popupName?: string | undefined; title: string; functionName?: string | undefined; link?: string | undefined; type: "popup" | "expand" | "function" | ""; actionSelectionRules?: (((row: TableRow) => boolean) | null) | undefined; }, actionType | { name: string | undefined; selection: "single" | "multiple" | "none"; rowKey?: string | string[] | undefined; popupName?: string | undefined; title: string; functionName?: string | undefined; link?: string | undefined; type: "popup" | "expand" | "function" | ""; actionSelectionRules?: (((row: TableRow) => boolean) | null) | undefined; }>; activeAction: (actionSelected: KettalPopupAction | KettalFunctionAction) => void; clearAction: () => void; confirmSelection: () => void; hideBottom: Ref; };