@oneclick.dev/cms-core-modules 0.0.121 → 0.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContentEditor-Dl41qaCh.js → ContentEditor-CoJjsV-m.js} +43 -43
- package/dist/{ContentEditor-u3k-uTny.mjs → ContentEditor-DIwqplfB.mjs} +10047 -11485
- package/dist/SendPush-CgSBEex2.js +1 -0
- package/dist/SendPush-CmbjcQBL.mjs +680 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +21 -10
- package/dist/languages-C_8yMQOH.mjs +4 -0
- package/dist/languages-Dqvk3X8G.js +1 -0
- package/dist/src/push-notifications/config.d.ts +22 -0
- package/dist/src/push-notifications/index.d.ts +22 -0
- package/dist/src/push-notifications/types.d.ts +5 -0
- package/package.json +2 -2
- package/dist/SendPush-COns44j7.js +0 -1
- package/dist/SendPush-CPIOjVX4.mjs +0 -184
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("lucide-vue-next"),ae=require("@oneclick.dev/cms-kit"),Ee=require("./languages-Dqvk3X8G.js"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.js"),we={class:"preview-iphone"},Se={class:"push-container"},Be={class:"inner"},De={class:"head"},Le={class:"app-name"},$e={class:"body"},Te={class:"push-title"},Pe={class:"push-message"},ze=e.defineComponent({__name:"PreviewIPhone",props:{app:{type:String,required:!0},title:{type:String,required:!0},message:{type:String,required:!0}},setup(r){return(u,l)=>(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",Se,[e.createElementVNode("div",Be,[e.createElementVNode("div",De,[e.createElementVNode("span",Le,e.toDisplayString(r.app),1),l[0]||(l[0]=e.createElementVNode("span",null,"now",-1))]),e.createElementVNode("div",$e,[e.createElementVNode("span",Te,e.toDisplayString(r.title),1),e.createElementVNode("span",Pe,e.toDisplayString(r.message),1)])])])]))}}),qe=oe._export_sfc(ze,[["__scopeId","data-v-8c84cde9"]]),Ie={class:"preview-android"},Fe={class:"push-container"},je={class:"inner"},Ae={class:"head"},Me={class:"app-name"},Ue={class:"body"},Oe={class:"push-title"},Re={class:"push-message"},Ge=e.defineComponent({__name:"PreviewAndroid",props:{app:{type:String,required:!0},title:{type:String,required:!0},message:{type:String,required:!0}},setup(r){return(u,l)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",Fe,[e.createElementVNode("div",je,[e.createElementVNode("div",Ae,[l[0]||(l[0]=e.createElementVNode("span",{class:"notification-badge"},null,-1)),e.createElementVNode("span",Me,e.toDisplayString(r.app),1),l[1]||(l[1]=e.createElementVNode("span",null,null,-1))]),e.createElementVNode("div",Ue,[e.createElementVNode("span",Oe,e.toDisplayString(r.title),1),e.createElementVNode("span",Re,e.toDisplayString(r.message),1)])])])]))}}),He=oe._export_sfc(Ge,[["__scopeId","data-v-202b94a8"]]),Ye={class:"flex flex-col"},Ke=e.defineComponent({__name:"PushPreview",props:{app:{type:String,required:!0},title:{type:String,required:!0},message:{type:String,required:!0}},setup(r){const u=r,l=e.ref("ios"),h=e.computed(()=>u.title.length>0?u.title:"Notification Preview"),C=e.computed(()=>u.message.length>0?u.message:"Preview your push notification");return(B,m)=>{const s=e.resolveComponent("SegmentedControlButton"),p=e.resolveComponent("SegmentedControl");return e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(p,{modelValue:e.unref(l),"onUpdate:modelValue":m[0]||(m[0]=v=>e.isRef(l)?l.value=v:null),class:"mx-auto mb-3"},{default:e.withCtx(()=>[e.createVNode(s,{value:"ios"},{default:e.withCtx(()=>[...m[1]||(m[1]=[e.createTextVNode(" iOS ",-1)])]),_:1}),e.createVNode(s,{value:"android"},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode(" Android ",-1)])]),_:1})]),_:1},8,["modelValue"]),e.unref(l)=="ios"?(e.openBlock(),e.createBlock(qe,{key:0,app:r.app,title:e.unref(h),message:e.unref(C)},null,8,["app","title","message"])):(e.openBlock(),e.createBlock(He,{key:1,app:r.app,title:e.unref(h),message:e.unref(C)},null,8,["app","title","message"]))])}}}),We={class:"@container/push w-full"},Je={class:"mx-auto flex w-full max-w-7xl flex-col gap-6 py-8"},Qe={class:"flex flex-col gap-4 @lg/push:flex-row @lg/push:items-center @lg/push:justify-between"},Xe={class:"flex items-center gap-4"},Ze={class:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-primary/15 bg-primary/10 text-primary"},et={class:"grid min-w-0 items-start gap-6 @5xl/push:grid-cols-[minmax(24rem,1fr)_30.25rem]"},tt={class:"flex flex-col flex-wrap gap-3 @md/editor:flex-row @md/editor:items-center @md/editor:justify-between"},at={class:"pt-6"},ot={class:"flex w-fit flex-wrap items-center gap-x-2 gap-y-1 rounded-full border bg-background px-3 py-1.5 text-xs text-muted-foreground","aria-live":"polite"},nt={key:0},st={key:1},lt={class:"space-y-2.5"},rt={class:"flex items-end justify-between gap-4"},it={class:"flex min-w-0 items-center gap-3 text-left"},dt={class:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted text-lg"},ct={class:"min-w-0"},ut={class:"flex items-center gap-2"},mt={class:"truncate text-sm font-medium"},pt={key:0,class:"rounded bg-muted px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground"},vt={class:"mt-0.5 block truncate text-xs text-muted-foreground",dir:"auto"},ft={class:"uppercase"},gt={class:"flex shrink-0 items-center gap-2"},xt={class:"text-base leading-none"},_t={class:"min-w-0 flex-1"},Nt={class:"block truncate text-sm font-medium"},Vt={class:"block truncate text-xs text-muted-foreground",dir:"auto"},yt={class:"uppercase"},ht={class:"text-base leading-none"},Ct={class:"min-w-0 flex-1"},kt={class:"block truncate text-sm font-medium"},bt={class:"block truncate text-xs text-muted-foreground",dir:"auto"},Et={class:"uppercase"},wt=["id"],St={class:"flex flex-col gap-3 @md/editor:flex-row @md/editor:items-center @md/editor:justify-between"},Bt={class:"mt-0.5 text-xs text-muted-foreground"},Dt={class:"truncate"},Lt={class:"space-y-2"},$t={class:"flex items-center justify-between gap-4"},Tt={key:0,class:"text-xs text-amber-600 dark:text-amber-400"},Pt={class:"space-y-2"},zt={class:"flex items-center justify-between gap-4"},qt={key:0,class:"text-xs text-amber-600 dark:text-amber-400"},It={key:0,class:"flex items-start gap-2 text-xs leading-relaxed text-muted-foreground"},Ft={key:1,class:"flex items-start gap-3 rounded-lg border border-amber-500/30 bg-amber-500/10 p-3"},jt={class:"text-xs leading-relaxed text-amber-800 dark:text-amber-200"},At={key:2,class:"flex items-start gap-2 text-xs leading-relaxed text-muted-foreground"},Mt={class:"flex items-start gap-2 text-xs text-muted-foreground"},Ut={key:0},Ot={key:1},Rt={class:"flex flex-col pt-6"},Gt={class:"overflow-x-auto px-3","aria-label":"Notification device preview"},Ht={class:"mx-auto w-max min-w-[450px]"},A=60,M=160,Yt=e.defineComponent({__name:"SendPush",props:{config:{type:Object,required:!0}},setup(r){const u=r;ae.useModuleBreadcrumbs(()=>[]);const{hasPermission:l}=ae.useModulePermissions(),h={title:"",message:""},C=new Map(Ee.languages.map(t=>[t.code.toLowerCase(),t])),B=t=>typeof t!="string"?"":t.trim().toLowerCase(),m=e.computed(()=>{const t=u.config.supportedLanguages;return(Array.isArray(t)?t:typeof t=="string"?[t]:[]).map(B).filter(S=>!!S)}),s=e.computed(()=>B(u.config.defaultLanguage)||m.value[0]||"en"),p=e.computed(()=>Array.from(new Set([s.value,...m.value]))),v=e.reactive({}),o=e.ref(s.value),k=e.ref(!1);e.watch(p,t=>{t.forEach(a=>{v[a]??={title:"",message:""}}),t.includes(o.value)||(o.value=s.value)},{immediate:!0}),e.watch(s,t=>{p.value.includes(o.value)||(o.value=t)});const D=t=>C.get(t)??{code:t,name:t.toUpperCase(),nativeName:t.toUpperCase(),flag:"🌐"},b=t=>v[t]??h,_=t=>!!b(t).title.trim(),N=t=>!!b(t).message.trim(),L=t=>_(t)&&N(t),$=t=>_(t)!==N(t),E=t=>L(t)?"ready":$(t)?"incomplete":t===s.value?"required":"fallback",ne={ready:"Translated",incomplete:"Incomplete",required:"Required",fallback:"Fallback"},U=t=>{const a=E(t);return t===s.value&&a==="ready"?"Ready":ne[a]},O={ready:"bg-emerald-500/10 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",incomplete:"bg-amber-500/10 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300",required:"bg-primary/10 text-primary",fallback:"bg-muted text-muted-foreground"},w=e.computed(()=>p.value.map(t=>{const a=E(t);return{...D(t),isDefault:t===s.value,status:a,statusLabel:U(t),statusClass:O[a]}})),i=e.computed(()=>w.value.find(t=>t.isDefault)),T=e.computed(()=>w.value.filter(t=>!t.isDefault)),d=e.computed(()=>D(o.value)),f=e.computed(()=>D(s.value)),P=e.computed(()=>b(o.value)),z=e.computed(()=>b(s.value)),V=e.computed({get:()=>P.value.title,set:t=>{v[o.value].title=t}}),y=e.computed({get:()=>P.value.message,set:t=>{v[o.value].message=t}}),g=e.computed(()=>o.value===s.value),R=e.computed(()=>!_(o.value)&&!N(o.value)),se=e.computed(()=>$(o.value)),le=e.computed(()=>_(o.value)||N(o.value)),q=e.computed(()=>L(s.value)),G=e.computed(()=>!g.value&&R.value),H=e.computed(()=>G.value?z.value:P.value),x=e.computed(()=>p.value.filter(t=>$(t)).length),Y=e.computed(()=>p.value.filter(t=>t!==s.value&&L(t)).length),re=e.computed(()=>Math.max(p.value.length-1,0)),ie=e.computed(()=>p.value.filter(t=>t!==s.value&&E(t)==="fallback").length),de=e.computed(()=>E(o.value)),ce=e.computed(()=>U(o.value)),ue=e.computed(()=>O[de.value]),K=e.computed(()=>!g.value&&q.value),me=e.computed(()=>le.value?`Replace with ${f.value.name}`:`Use ${f.value.name} as a starting point`),pe=e.computed(()=>q.value&&x.value===0&&l("send-push")),I=e.computed(()=>l("send-push")?q.value?x.value>0?`Finish ${x.value} incomplete ${x.value===1?"translation":"translations"}.`:"":`Add a ${[_(s.value)?"":"title",N(s.value)?"":"message"].filter(Boolean).join(" and ")} in ${f.value.name}.`:"You do not have permission to send push notifications."),ve=()=>{K.value&&(v[o.value].title=z.value.title,v[o.value].message=z.value.message)},W=t=>{o.value=t,k.value=!1};return(t,a)=>{const S=e.resolveComponent("CardTitle"),J=e.resolveComponent("CardDescription"),Q=e.resolveComponent("CardHeader"),F=e.resolveComponent("Label"),j=e.resolveComponent("Button"),fe=e.resolveComponent("PopoverTrigger"),ge=e.resolveComponent("CommandInput"),xe=e.resolveComponent("CommandEmpty"),X=e.resolveComponent("CommandItem"),Z=e.resolveComponent("CommandGroup"),_e=e.resolveComponent("CommandSeparator"),Ne=e.resolveComponent("CommandList"),Ve=e.resolveComponent("Command"),ye=e.resolveComponent("PopoverContent"),he=e.resolveComponent("Popover"),Ce=e.resolveComponent("Input"),ke=e.resolveComponent("Textarea"),ee=e.resolveComponent("CardContent"),be=e.resolveComponent("CardFooter"),te=e.resolveComponent("Card");return e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("div",Je,[e.createElementVNode("header",Qe,[e.createElementVNode("div",Xe,[e.createElementVNode("div",Ze,[e.createVNode(e.unref(c.BellRing),{class:"size-5"})]),a[4]||(a[4]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-2xl font-semibold tracking-tight"}," Send notification ")],-1))])]),e.createElementVNode("main",et,[e.createVNode(te,{class:"@container/editor min-w-0 overflow-hidden py-0"},{default:e.withCtx(()=>[e.createVNode(Q,{class:"border-b bg-muted/20"},{default:e.withCtx(()=>[e.createElementVNode("div",tt,[e.createElementVNode("div",at,[e.createVNode(S,{class:"text-base"},{default:e.withCtx(()=>[...a[5]||(a[5]=[e.createTextVNode("Notification content",-1)])]),_:1}),e.createVNode(J,{class:"mt-1"},{default:e.withCtx(()=>[...a[6]||(a[6]=[e.createTextVNode(" Create the default message, then add translations where needed. ",-1)])]),_:1})]),e.createElementVNode("div",ot,[e.createVNode(e.unref(c.Languages),{class:"size-3.5"}),re.value>0?(e.openBlock(),e.createElementBlock("span",nt,[e.createTextVNode(e.toDisplayString(Y.value)+" translated ",1),a[8]||(a[8]=e.createElementVNode("span",{"aria-hidden":"true"},"·",-1)),e.createTextVNode(" "+e.toDisplayString(ie.value)+" fallback ",1),x.value>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a[7]||(a[7]=e.createElementVNode("span",{"aria-hidden":"true"},"·",-1)),e.createTextVNode(" "+e.toDisplayString(x.value)+" incomplete ",1)],64)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",st,"Default copy only"))])])]),_:1}),e.createVNode(ee,{class:"space-y-6 px-5 @md/editor:px-6"},{default:e.withCtx(()=>[e.createElementVNode("section",lt,[e.createElementVNode("div",rt,[e.createElementVNode("div",null,[e.createVNode(F,{class:"text-sm font-medium"},{default:e.withCtx(()=>[...a[9]||(a[9]=[e.createTextVNode("Language",-1)])]),_:1}),a[10]||(a[10]=e.createElementVNode("p",{class:"mt-0.5 text-xs text-muted-foreground"}," Choose the version you want to edit. ",-1))]),a[11]||(a[11]=e.createElementVNode("span",{class:"hidden text-xs text-muted-foreground @sm/editor:inline"}," Drafts are kept when you switch ",-1))]),e.createVNode(he,{open:k.value,"onUpdate:open":a[1]||(a[1]=n=>k.value=n)},{default:e.withCtx(()=>[e.createVNode(fe,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(j,{type:"button",variant:"outline",role:"combobox","aria-expanded":k.value,"aria-label":"Choose notification language",class:"h-auto w-full justify-between gap-3 rounded-xl px-3 py-2.5 font-normal hover:bg-muted/40"},{default:e.withCtx(()=>[e.createElementVNode("span",it,[e.createElementVNode("span",dt,e.toDisplayString(d.value.flag),1),e.createElementVNode("span",ct,[e.createElementVNode("span",ut,[e.createElementVNode("span",mt,e.toDisplayString(d.value.name),1),g.value?(e.openBlock(),e.createElementBlock("span",pt," Default ")):e.createCommentVNode("",!0)]),e.createElementVNode("span",vt,[d.value.nativeName!==d.value.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.nativeName)+" ",1),a[12]||(a[12]=e.createElementVNode("span",{"aria-hidden":"true"}," · ",-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("span",ft,e.toDisplayString(o.value),1)])])]),e.createElementVNode("span",gt,[e.createElementVNode("span",{class:e.normalizeClass(["rounded-full px-2 py-1 text-[10px] font-medium",ue.value])},e.toDisplayString(ce.value),3),w.value.length>1?(e.openBlock(),e.createBlock(e.unref(c.ChevronsUpDown),{key:0,class:"size-4 text-muted-foreground"})):e.createCommentVNode("",!0)])]),_:1},8,["aria-expanded"])]),_:1}),e.createVNode(ye,{align:"start",side:"bottom","side-offset":6,class:"w-[var(--reka-popover-trigger-width)] min-w-72 max-w-[calc(100vw-2rem)] p-0"},{default:e.withCtx(()=>[e.createVNode(Ve,null,{default:e.withCtx(()=>[w.value.length>5?(e.openBlock(),e.createBlock(ge,{key:0,placeholder:"Search languages..."})):e.createCommentVNode("",!0),e.createVNode(Ne,{class:"max-h-80"},{default:e.withCtx(()=>[e.createVNode(xe,null,{default:e.withCtx(()=>[...a[13]||(a[13]=[e.createTextVNode("No language found.",-1)])]),_:1}),i.value?(e.openBlock(),e.createBlock(Z,{key:0,heading:"Default language"},{default:e.withCtx(()=>[e.createVNode(X,{value:`${i.value.name} ${i.value.nativeName} ${i.value.code}`,class:"gap-3 py-2.5",onSelect:a[0]||(a[0]=n=>W(i.value.code))},{default:e.withCtx(()=>[e.createElementVNode("span",xt,e.toDisplayString(i.value.flag),1),e.createElementVNode("span",_t,[e.createElementVNode("span",Nt,e.toDisplayString(i.value.name),1),e.createElementVNode("span",Vt,[i.value.nativeName!==i.value.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.value.nativeName)+" ",1),a[14]||(a[14]=e.createElementVNode("span",{"aria-hidden":"true"}," · ",-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("span",yt,e.toDisplayString(i.value.code),1)])]),e.createElementVNode("span",{class:e.normalizeClass(["rounded-full px-2 py-1 text-[10px] font-medium",i.value.statusClass])},e.toDisplayString(i.value.statusLabel),3),e.createVNode(e.unref(c.Check),{class:e.normalizeClass(["size-4 shrink-0 text-primary",o.value===i.value.code?"opacity-100":"opacity-0"])},null,8,["class"])]),_:1},8,["value"])]),_:1})):e.createCommentVNode("",!0),T.value.length>0?(e.openBlock(),e.createBlock(_e,{key:1})):e.createCommentVNode("",!0),T.value.length>0?(e.openBlock(),e.createBlock(Z,{key:2,heading:`Translations · ${Y.value} translated`},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,n=>(e.openBlock(),e.createBlock(X,{key:n.code,value:`${n.name} ${n.nativeName} ${n.code}`,class:"gap-3 py-2.5",onSelect:Kt=>W(n.code)},{default:e.withCtx(()=>[e.createElementVNode("span",ht,e.toDisplayString(n.flag),1),e.createElementVNode("span",Ct,[e.createElementVNode("span",kt,e.toDisplayString(n.name),1),e.createElementVNode("span",bt,[n.nativeName!==n.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.nativeName)+" ",1),a[15]||(a[15]=e.createElementVNode("span",{"aria-hidden":"true"}," · ",-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("span",Et,e.toDisplayString(n.code),1)])]),e.createElementVNode("span",{class:e.normalizeClass(["rounded-full px-2 py-1 text-[10px] font-medium",n.statusClass])},e.toDisplayString(n.statusLabel),3),e.createVNode(e.unref(c.Check),{class:e.normalizeClass(["size-4 shrink-0 text-primary",o.value===n.code?"opacity-100":"opacity-0"])},null,8,["class"])]),_:2},1032,["value","onSelect"]))),128))]),_:1},8,["heading"])):e.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])]),e.createElementVNode("section",{id:`notification-panel-${o.value}`,class:"space-y-6"},[e.createElementVNode("div",St,[e.createElementVNode("div",null,[a[17]||(a[17]=e.createElementVNode("h2",{class:"text-sm font-semibold"},"Message copy",-1)),e.createElementVNode("p",Bt,[e.createTextVNode(" Editing "+e.toDisplayString(d.value.name)+" ",1),g.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" fallback")],64)):e.createCommentVNode("",!0),a[16]||(a[16]=e.createTextVNode(" content. ",-1))])]),!g.value&&K.value?(e.openBlock(),e.createBlock(j,{key:0,type:"button",variant:"outline",size:"sm",class:"w-fit max-w-full justify-start",onClick:ve},{default:e.withCtx(()=>[e.createVNode(e.unref(c.Copy),{class:"size-3.5"}),e.createElementVNode("span",Dt,e.toDisplayString(me.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Lt,[e.createElementVNode("div",$t,[e.createVNode(F,{for:`send_push_title_${o.value}`,class:"text-sm font-medium"},{default:e.withCtx(()=>[...a[18]||(a[18]=[e.createTextVNode(" Title ",-1)])]),_:1},8,["for"]),e.createElementVNode("span",{class:e.normalizeClass(["text-xs tabular-nums",V.value.length>A?"text-amber-600 dark:text-amber-400":"text-muted-foreground"])},[e.createTextVNode(e.toDisplayString(V.value.length)+"/"+e.toDisplayString(A)+" ",1),a[19]||(a[19]=e.createElementVNode("span",{class:"hidden @lg/editor:inline"},"recommended",-1))],2)]),e.createVNode(Ce,{id:`send_push_title_${o.value}`,modelValue:V.value,"onUpdate:modelValue":a[2]||(a[2]=n=>V.value=n),type:"text",lang:o.value,dir:"auto",placeholder:`Add a title in ${d.value.name}`,autocomplete:"off",class:"h-11"},null,8,["id","modelValue","lang","placeholder"]),V.value.length>A?(e.openBlock(),e.createElementBlock("p",Tt," Longer titles may be shortened on some devices. ")):e.createCommentVNode("",!0)]),e.createElementVNode("div",Pt,[e.createElementVNode("div",zt,[e.createVNode(F,{for:`send_push_message_${o.value}`,class:"text-sm font-medium"},{default:e.withCtx(()=>[...a[20]||(a[20]=[e.createTextVNode(" Message ",-1)])]),_:1},8,["for"]),e.createElementVNode("span",{class:e.normalizeClass(["text-xs tabular-nums",y.value.length>M?"text-amber-600 dark:text-amber-400":"text-muted-foreground"])},[e.createTextVNode(e.toDisplayString(y.value.length)+"/"+e.toDisplayString(M)+" ",1),a[21]||(a[21]=e.createElementVNode("span",{class:"hidden @lg/editor:inline"},"recommended",-1))],2)]),e.createVNode(ke,{id:`send_push_message_${o.value}`,modelValue:y.value,"onUpdate:modelValue":a[3]||(a[3]=n=>y.value=n),lang:o.value,dir:"auto",placeholder:`Write the notification message in ${d.value.name}`,class:"min-h-36 resize-y"},null,8,["id","modelValue","lang","placeholder"]),y.value.length>M?(e.openBlock(),e.createElementBlock("p",qt," Longer messages may be truncated in the notification tray. ")):e.createCommentVNode("",!0)]),g.value?(e.openBlock(),e.createElementBlock("div",It,[e.createVNode(e.unref(c.Globe2),{class:"mt-0.5 size-3.5 shrink-0 text-primary"}),a[22]||(a[22]=e.createElementVNode("p",null," Required fallback for languages without their own translation. ",-1))])):se.value?(e.openBlock(),e.createElementBlock("div",Ft,[e.createVNode(e.unref(c.AlertCircle),{class:"mt-0.5 size-4 shrink-0 text-amber-600 dark:text-amber-400"}),e.createElementVNode("p",jt," Complete both fields, or clear this translation to use "+e.toDisplayString(f.value.name)+" as the fallback. ",1)])):R.value?(e.openBlock(),e.createElementBlock("div",At,[e.createVNode(e.unref(c.Languages),{class:"mt-0.5 size-3.5 shrink-0"}),e.createElementVNode("p",null," No "+e.toDisplayString(d.value.name)+" translation — recipients will see the "+e.toDisplayString(f.value.name)+" fallback. ",1)])):e.createCommentVNode("",!0)],8,wt)]),_:1}),e.createVNode(be,{class:"flex flex-col gap-4 border-t bg-muted/20 px-5 py-4 @md/editor:flex-row @md/editor:items-center @md/editor:justify-between @md/editor:px-6"},{default:e.withCtx(()=>[e.createElementVNode("div",Mt,[e.createVNode(e.unref(c.AlertCircle),{class:"mt-0.5 size-3.5 shrink-0"}),I.value?(e.openBlock(),e.createElementBlock("span",Ut,e.toDisplayString(I.value),1)):(e.openBlock(),e.createElementBlock("span",Ot," Review the live preview before sending. Delivery cannot be undone. "))]),e.createVNode(j,{class:"w-full shrink-0 @md/editor:w-auto",disabled:!pe.value,title:I.value},{default:e.withCtx(()=>[e.createVNode(e.unref(c.Send),{class:"size-4"}),a[23]||(a[23]=e.createTextVNode(" Send notification ",-1))]),_:1},8,["disabled","title"])]),_:1})]),_:1}),e.createVNode(te,{class:"min-w-0 overflow-hidden @4xl/push:sticky @4xl/push:top-6 py-0"},{default:e.withCtx(()=>[e.createVNode(Q,{class:"border-b bg-muted/20"},{default:e.withCtx(()=>[e.createElementVNode("div",Rt,[e.createVNode(S,{class:"text-base"},{default:e.withCtx(()=>[...a[24]||(a[24]=[e.createTextVNode("Live preview",-1)])]),_:1}),e.createVNode(J,{class:"mt-0.5 mb-0"},{default:e.withCtx(()=>[G.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" Previewing "+e.toDisplayString(f.value.name)+" fallback for "+e.toDisplayString(d.value.name),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d.value.flag)+" "+e.toDisplayString(d.value.name)+" notification ",1)],64))]),_:1})])]),_:1}),e.createVNode(ee,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",Gt,[e.createElementVNode("div",Ht,[e.createVNode(Ke,{app:r.config.appName||"Your app",title:H.value.title,message:H.value.message},null,8,["app","title","message"])])])]),_:1})]),_:1})])])])}}});exports.default=Yt;
|