"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
    provide: 'device_type',
    isSticky: true,
    shouldTrack: true,
    getValue: async (inputs) => {
        // TODO: convert parsedUA to a lazy property of inputs
        const device = inputs.metadata.parsedUA?.device;
        switch (device.type) {
            case 'mobile':
                // The dimension value is 'phone', which is clearer to US English speakers.
                return 'phone';
            case 'tablet':
            case 'desktop_laptop':
                // These are already valid values for the dimension, so return them literally.
                return device.type;
            default:
                // Any other device type falls under this catch-all.
                return 'other';
        }
    },
};
