import{A as n}from"./AmaTRG5a.js";import{u as l}from"./BHvLfWtM.js";import{_ as p,c as g,b as t,t as u,G as c,f as d,I as _,o as f}from"./Bgmy51Qv.js";const h={name:"ImageInput",data(){return{imageData:null}},mixins:[l],components:{AjaxButton:n},props:{saving:{type:Boolean,default:!1},image:{type:String,default:""}},watch:{image(e){this.imageData=e}},computed:{imageName(){var e;return(e=this.image)!=null&&e.trim()?this.image:this.defaultImage}},methods:{},mounted(){this.imageData=this.image}},v={class:"image-url-wrap file-wrapper"},D={class:"file-input"},x=["src"],y={class:"input-wrapper"},b={class:"image-input"},w=["placeholder"];function B(e,a,o,I,i,r){const m=n;return f(),g("div",v,[t("div",D,[t("img",{src:e.getImageURL(r.imageName)},null,8,x)]),t("div",y,[t("label",null,u(e.$t("error.fn")),1),t("div",b,[c(t("input",{type:"text",placeholder:e.$t("error.fn"),"onUpdate:modelValue":a[0]||(a[0]=s=>i.imageData=s)},null,8,w),[[_,i.imageData]]),d(m,{class:"primary-btn",type:"button",text:e.$t("setting.sv"),"loading-text":"","fetching-data":o.saving,onClicked:a[1]||(a[1]=s=>e.$emit("image-change",i.imageData))},null,8,["text","fetching-data"])])])])}const V=p(h,[["render",B]]);export{V as _};
