import { user_properties, params, user_id, method } from '../ga4-properties';
import { updateUser } from '../ga4-functions';
const action = {
    title: 'Login',
    description: 'Send event when a user logs in',
    platform: 'web',
    defaultSubscription: 'type = "track" and event = "Signed In"',
    fields: {
        user_id: user_id,
        method: method,
        user_properties: user_properties,
        params: params
    },
    perform: (gtag, { payload }) => {
        updateUser(payload.user_id, payload.user_properties, gtag);
        gtag('event', 'login', {
            method: payload.method,
            ...payload.params
        });
    }
};
export default action;
//# sourceMappingURL=index.js.map