define(["app"],function(app){"use strict";app.controller("MainCtrl",function($rootScope,$scope,$illustration,$t_shirt){$rootScope.API_URL="http://domain.com",$scope.designFrameView="views/tshirt-design.html?ver="+VERSION,$scope.designPartIllustration="views/design_part/illustration.html?ver="+VERSION,$scope.designPartImage="views/design_part/image.html?ver="+VERSION,$scope.designPartText="views/design_part/text.html?ver="+VERSION,$scope.designPartDefault="views/design_part/default.html?ver="+VERSION,$scope.tShirtColor=$t_shirt.getTShirtColor(0);var tShirtColorFirstKey=0;$scope.tShirtChoiceBackFrontKey="front",$scope.tShirtColorKey=tShirtColorFirstKey,$rootScope.tShirtColorCode=$scope.tShirtColor[tShirtColorFirstKey].code,$scope.tShirtColorName=$scope.tShirtColor[tShirtColorFirstKey].name,$scope.tShirtImgFront=$scope.tShirtColor[tShirtColorFirstKey].img.front,$scope.tShirtImgBack=$scope.tShirtColor[tShirtColorFirstKey].img.back,$scope.tShirtImg=$scope.tShirtImgFront,$scope.choiceTShirtColor=function(key){$scope.tShirtColorKey=key,$rootScope.tShirtColorCode=$scope.tShirtColor[key].code,$scope.tShirtColorName=$scope.tShirtColor[key].name,$scope.tShirtImgFront=$scope.tShirtColor[key].img.front,$scope.tShirtImgBack=$scope.tShirtColor[key].img.back,"front"==$scope.tShirtChoiceBackFrontKey?$scope.tShirtImg=$scope.tShirtImgFront:$scope.tShirtImg=$scope.tShirtImgBack},$scope.choiceTShirtBackFront=function(choice){"front"==choice?$scope.tShirtImg=$scope.tShirtImgFront:$scope.tShirtImg=$scope.tShirtImgBack,$scope.tShirtChoiceBackFrontKey=choice},$scope.showDesignTab=function(tab){switch($rootScope.isShowLeftPanel=tab,tab){case"illustration":$scope.IllustrationList=$illustration.getAll(),$scope.illustrationSelectConfig={allowClear:!0};break;case"text":}},$rootScope.safeApply=function(fn){var phase=this.$root.$$phase;"$apply"==phase||"$digest"==phase?fn&&"function"==typeof fn&&fn():this.$apply(fn)},$scope.modalTShirtDesign=function(){$("#tshirt-design").modal({backdrop:"static",keyboard:!1}),$scope.showDesignTab("default")},$scope.modalClose=function(){$("#tshirt-design").modal("hide")}})});