import { createTrackingEvent } from './creator.js';
import { AnalyticsEventType } from './types.js';
const languageSwitchEvent = createTrackingEvent(AnalyticsEventType.CodeSampleLanguageSwitched);
export const createLanguageSwitchEvent = ({ operation, sample, }) => {
    const { lang, label } = sample;
    return languageSwitchEvent({
        resource: 'Redocly_CodeSample',
        action: 'LanguageSwitched',
        operationId: operation.id,
        operationPath: operation.path,
        operationHttpVerb: operation.httpVerb,
        operationSummary: operation.name,
        label: label || lang,
        lang,
        // exampleId?: string; // TODO add example switch event
    });
};
//# sourceMappingURL=languageSwitch.js.map