You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
2.1 KiB

var b=Object.defineProperty;var p=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var i=(t,e,s)=>p(t,typeof e!="symbol"?e+"":e,s);import{C as h,V as C,_ as m,x as v,h as u,j as n,t as d,k as g,m as f,s as x,l as _}from"./index-BLqts8WY.js";var k=Object.defineProperty,w=Object.getOwnPropertyDescriptor,y=(t,e,s,o)=>{for(var a=o>1?void 0:o?w(e,s):e,c=t.length-1,l;c>=0;c--)(l=t[c])&&(a=(o?l(e,s,a):l(a))||a);return o&&a&&k(e,s,a),a};let r=class extends C{constructor(){super(...arguments);i(this,"cancelCallback",()=>{});i(this,"saveCallback",()=>{});i(this,"message","");i(this,"newText","");i(this,"title","Contact Name");i(this,"visible",!1)}async open(s,o,a,c,l){this.cancelCallback=c||this.cancelCallback,this.saveCallback=a||this.saveCallback,this.message=o??this.message,this.newText=l??"",this.title=s??this.title,this.visible=!0}async onClickSaveChanges(){this.visible=!1,this.saveCallback&&this.saveCallback(this.newText)}onClickCancel(){this.visible=!1,this.cancelCallback&&this.cancelCallback()}};r=y([h],r);const N={key:0,class:"dialog-overlay"},D={class:"dialog"},T={class:"text-xl font-bold text-center mb-4"},$={class:"mt-8"},V={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function O(t,e,s,o,a,c){return t.visible?(v(),u("div",N,[n("div",D,[n("h1",T,d(t.title),1),g(" "+d(t.message)+" Note that their name is only stored on this device. ",1),f(n("input",{type:"text",placeholder:"Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2","onUpdate:modelValue":e[0]||(e[0]=l=>t.newText=l)},null,512),[[x,t.newText]]),n("div",$,[n("div",V,[n("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[1]||(e[1]=l=>t.onClickSaveChanges())}," Save "),n("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[2]||(e[2]=l=>t.onClickCancel())}," Cancel ")])])])])):_("",!0)}const B=m(r,[["render",O]]);export{B as C};