/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
export async function smartInvokable(functionRef, ...payloads) {
    var _a;
    if (functionRef) {
        if (typeof functionRef === 'string') {
            if (this === null || this === void 0 ? void 0 : this.blazorRef)
                return await ((_a = this.blazorRef) === null || _a === void 0 ? void 0 : _a.invokeMethodAsync(functionRef, ...payloads));
        }
        else {
            return (await functionRef(...payloads));
        }
    }
}
