"use strict";
var DeviceAppDataFactory = (function () {
    function DeviceAppDataFactory($deviceAppDataProvider, $injector, $options) {
        this.$deviceAppDataProvider = $deviceAppDataProvider;
        this.$injector = $injector;
        this.$options = $options;
    }
    DeviceAppDataFactory.prototype.create = function (appIdentifier, platform, device) {
        var factoryRules = this.$deviceAppDataProvider.createFactoryRules();
        var ctor = factoryRules[platform][this.$options.companion ? "companion" : "vanilla"];
        return this.$injector.resolve(ctor, { _appIdentifier: appIdentifier, device: device, platform: platform });
    };
    return DeviceAppDataFactory;
})();
exports.DeviceAppDataFactory = DeviceAppDataFactory;
$injector.register("deviceAppDataFactory", DeviceAppDataFactory);
