import type { FramePay as FramepayApi } from '@rebilly/framepay';

/**
 * Just simple wrapper of remote FramePay api
 */
const remoteApi = (): FramepayApi => {
    // @ts-expect-error todo setup typescript config correctly
    return typeof window !== 'undefined' ? window.Framepay : undefined;
};

export default function getFramepayApi(): FramepayApi {
    return remoteApi();
}
