import { getFormFactor } from 'talon/configProvider';

/**
 * Resolves '@salesforce/client' resources.
 */
export default {
    scope: 'client',

    resolve(resource) {
        if (resource === 'formFactor') {
            return getFormFactor();
        }
        throw new Error(
            `Unknown resource, cannot resolve dependency '@salesforce/client/${resource}'`
        );
    },
};
