"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const action = {
    title: 'Identify Company',
    description: 'Create or update a company entity in Userpilot',
    platform: 'web',
    defaultSubscription: 'type = "group"',
    fields: {
        groupId: {
            type: 'string',
            required: true,
            description: 'The ID of the company.',
            label: 'Company ID',
            default: {
                '@path': '$.groupId'
            }
        },
        traits: {
            type: 'object',
            required: false,
            description: 'Company traits',
            label: 'Traits',
            default: {
                '@path': '$.traits'
            }
        }
    },
    perform: (_, events) => {
        window.userpilot.group(events.payload.groupId ?? '', events.payload.traits ?? {});
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map