"use strict";var e=require("../../../common/vendor.js");const t={components:{Layout:()=>"./Layout.js"},data:()=>({baseUrl:e.index.getStorageSync("requestPath"),statusBarHeight:e.index.getSystemInfoSync().statusBarHeight+"px",device:"back",cameraContext:null,shutterShow:!1,coverImage:null,menuLeft:"100%"}),mounted(){e.index.getSystemInfo({success:t=>{const a=e.index.getMenuButtonBoundingClientRect();this.menuLeft=a.left+"px"},fail:e=>{console.log(e)}}),this.cameraContext=e.index.createCameraContext()},methods:{switchCamera(){this.device="back"===this.device?"front":"back"},back(){e.index.navigateBack()},error(e){console.log(e)},takePhoto(){this.$emit("takePhoto")},handleInstruct(t){switch(t){case"back":this.$emit("back");break;case"shutter":this.cameraContext.takePhoto({quality:"high",success:e=>{this.$emit("getImage",e.tempImagePath)}});break;case"reversal":this.device="back"===this.device?"front":"back";break;case"album":e.index.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album"],success:t=>{e.index.setStorageSync("tongueUrl",t.tempFilePaths[0]),this.$emit("getImage")}})}}}};if(!Array){e.resolveComponent("Layout")()}var a=e._export_sfc(t,[["render",function(t,a,s,o,c,n){return{a:c.statusBarHeight,b:e.o(((...e)=>n.back&&n.back(...e))),c:c.baseUrl+"/images/ques.png",d:c.menuLeft,e:c.baseUrl+"/images/tongue.png",f:c.device,g:e.o(((...e)=>n.error&&n.error(...e))),h:e.o(n.handleInstruct),i:e.o((e=>n.switchCamera())),j:e.o(n.takePhoto)}}],["__scopeId","data-v-182b0410"]]);wx.createComponent(a);