(function() {
	'use strict';

	// implementation of the file path dialogs; which lets the user enter a local file path
	// even when they are working from the browser
	angular.module('uniflash').service('ufLocalFileDialogs', localFileDialogs);

	localFileDialogs.$inject = ['$uibModal'];

	function localFileDialogs($uibModal) {

		function openFile(title,initPath) {
			var modalInstance = $uibModal.open({
				templateUrl: 'programs/cloud/open_local_file.html',
				controllerAs: 'vm',
				controller: OpenFileDialogController
			});

			function OpenFileDialogController() {
				var vm = this;
				vm.title = title;
				vm.filePath = initPath;
			}

			return modalInstance.result.then(function(filePath) {
			});
		}

		return {
			openFile: openFile
		};
	}

})();