import { DestinationWeb } from '@walkeros/web-core';
import { Flow } from '@walkeros/core';

declare global {
    interface Window {
        snowplow?: SnowplowFunction;
        GlobalSnowplowNamespace?: string;
    }
}
interface SnowplowFunction {
    (...args: unknown[]): void;
    q?: unknown[];
}
/**
 * Environment dependencies for Snowplow destination
 */
interface Env extends DestinationWeb.Env {
    window: {
        snowplow?: SnowplowFunction;
    };
}

declare const init: Env | undefined;
declare const push: Env;
declare const simulation: string[];

declare const env_init: typeof init;
declare const env_push: typeof push;
declare const env_simulation: typeof simulation;
declare namespace env {
  export { env_init as init, env_push as push, env_simulation as simulation };
}

declare const productView: Flow.StepExample;
declare const addToCart: Flow.StepExample;
declare const transaction: Flow.StepExample;
declare const promoView: Flow.StepExample;
declare const pageView: Flow.StepExample;
declare const checkoutStep: Flow.StepExample;
declare const structuredEvent: Flow.StepExample;
declare const contextLoop: Flow.StepExample;

declare const step_addToCart: typeof addToCart;
declare const step_checkoutStep: typeof checkoutStep;
declare const step_contextLoop: typeof contextLoop;
declare const step_pageView: typeof pageView;
declare const step_productView: typeof productView;
declare const step_promoView: typeof promoView;
declare const step_structuredEvent: typeof structuredEvent;
declare const step_transaction: typeof transaction;
declare namespace step {
  export { step_addToCart as addToCart, step_checkoutStep as checkoutStep, step_contextLoop as contextLoop, step_pageView as pageView, step_productView as productView, step_promoView as promoView, step_structuredEvent as structuredEvent, step_transaction as transaction };
}

export { env, step };
