(()=>{function e(r,a,c){var o=this;function i(e){o.wizardCtrl.close({path:e})}function n(e){var t=o.wizardCtrl,r=t.data;r.errorMsg=e.errorMessage,r.backStep=t.getCurrentStep().stepId,t.goTo("error")}_.assign(o,{model:{},create:function(e){var t=o.wizardCtrl.data.selectedProtocol,t=(_.assign(e,{fieldbusType:t.id}),r.getService(t));return o.pending=!0,c.when(a.save(e)).then(t.detailPath).then(i,n)}})}e.$inject=["c8yDeviceProtocolUi","c8yDeviceDatabase","$q"],angular.module("c8y.deviceProtocolForDeviceDatabase4").component("c8yDeviceTypeCreateStep",{require:{wizardCtrl:"^c8yWizardStep"},templateUrl:":::PLUGIN_PATH:::/device-type-create-step.html",controller:e,controllerAs:"vm"})})();