import { user_properties, params, user_id, search_term } from '../ga4-properties';
import { updateUser } from '../ga4-functions';
const action = {
    title: 'Search',
    description: 'The term that was searched for.',
    defaultSubscription: 'type = "track" and event = "Products Searched"',
    platform: 'web',
    fields: {
        user_id: user_id,
        user_properties: user_properties,
        params: params,
        search_term: search_term
    },
    perform: (gtag, { payload }) => {
        updateUser(payload.user_id, payload.user_properties, gtag);
        gtag('event', 'search', {
            search_term: payload.search_term,
            ...payload.params
        });
    }
};
export default action;
//# sourceMappingURL=index.js.map