(function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o["vue-push-notification-preview"]={},o.Vue))})(this,function(o,e){"use strict";const l=Object.freeze({IPHONE_X_HEIGHT:614,IPHONE_X_WIDTH:300,PIXEL_4_HEIGHT:644,PIXEL_4_WIDTH:300}),a=Object.freeze({LIGHT:"light",DARK:"dark"}),y=Object.freeze({LIGHT:"vpnp-notification-light-mode",DARK:"vpnp-notification-dark-mode"}),T=Object.freeze({INITIAL:"vpnp-notification-initial-size",EXPANDED:"vpnp-notification-expanded-size"}),N=({image:t,backgroundImage:n,backgroundColor:r,appearanceMode:g,textTitle:h,textBody:s})=>{const d=e.computed(()=>t.value!==""?{"background-image":`url(${t.value})`}:{}),p=e.computed(()=>n.value!==""?{"background-image":`url(${n.value})`}:r.value!==""?{"background-color":r.value}:{}),_=e.computed(()=>{switch(g.value){case a.LIGHT:return y.LIGHT;case a.DARK:return y.DARK;default:throw new Error("Unrecognized appearance mode!")}}),E=e.computed(()=>h.value!==""),m=e.computed(()=>s.value!==""),c=e.computed(()=>t.value!==""),i=e.computed(()=>m.value),f=e.computed(()=>i.value?T.EXPANDED:T.INITIAL);return{notificationImageStyle:d,backgroundStyle:p,appearanceModeClass:_,hasTitle:E,hasBody:m,hasImage:c,isExpanded:i,notificationExpandedClass:f}},I={class:"vpnp-iphone_x"},k={class:"vpnp-content"},H={class:"vpnp-header"},u={class:"vpnp-notification-heading"},x={class:"vpnp-notification-heading-icon-name-container"},S=["innerHTML"],V=["innerHTML"],C={class:"vpnp-notification-content"},B={class:"vpnp-notification-content-text"},L=["innerHTML"],b=["innerHTML"],M={__name:"IphonePreview",props:{textApplicationName:{type:String,default:"App name"},textTime:{type:String,default:"1h ago",validator:t=>t.length<8},textTitle:{type:String,default:"Title notification"},textBody:{type:String,default:""},height:{type:Number,default:l.IPHONE_X_HEIGHT},image:{type:String,default:""},backgroundImage:{type:String,default:""},backgroundColor:{type:String,default:"#c1c1c1"},appearanceMode:{type:String,default:a.LIGHT,validator:t=>Object.values(a).indexOf(t)!==-1}},setup(t){const n=t,{notificationImageStyle:r,backgroundStyle:g,appearanceModeClass:h,hasTitle:s,hasBody:d,hasImage:p,isExpanded:_,notificationExpandedClass:E}=N({image:e.toRef(n,"image"),backgroundImage:e.toRef(n,"backgroundImage"),backgroundColor:e.toRef(n,"backgroundColor"),appearanceMode:e.toRef(n,"appearanceMode"),textTitle:e.toRef(n,"textTitle"),textBody:e.toRef(n,"textBody")}),m=e.computed(()=>({height:`${n.height}px`,width:`${n.height*(l.IPHONE_X_WIDTH/l.IPHONE_X_HEIGHT)}px`}));return(c,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vpnp-wrapper-iphone_x"]),style:e.normalizeStyle([e.unref(g),m.value])},[e.createElementVNode("div",I,[e.createElementVNode("div",k,[e.createElementVNode("div",H,[e.renderSlot(c.$slots,"header")]),e.createElementVNode("div",{class:e.normalizeClass(["vpnp-notification",e.unref(h),e.unref(E)])},[e.createElementVNode("div",u,[e.createElementVNode("div",x,[e.createElementVNode("p",{class:"vpnp-notification-application-icon",onClick:i[0]||(i[0]=(...f)=>c.toggleNotification&&c.toggleNotification(...f))}),e.createElementVNode("p",{class:"vpnp-notification-application-name",innerHTML:t.textApplicationName},null,8,S)]),e.createElementVNode("p",{class:"vpnp-notification-time",innerHTML:t.textTime},null,8,V)]),e.createElementVNode("div",C,[e.createElementVNode("div",B,[e.unref(s)?(e.openBlock(),e.createElementBlock("p",{key:0,class:"vpnp-notification-title",innerHTML:t.textTitle},null,8,L)):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:1,class:"vpnp-notification-body",innerHTML:t.textBody},null,8,b)):e.createCommentVNode("",!0)]),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vpnp-notification-content-image",style:e.normalizeStyle([e.unref(r)])},null,4)):e.createCommentVNode("",!0)])],2)])])],4))}},A={class:"vpnp-pixel_4"},P={class:"vpnp-content"},$={class:"vpnp-header"},O={class:"vpnp-notification-heading"},R=e.createElementVNode("p",{class:"vpnp-notification-application-icon"},null,-1),z=["innerHTML"],D={class:"vpnp-notification-application-time-container"},w=e.createElementVNode("p",{class:"vpnp-notification-application-time-separator",innerHTML:"ยท"},null,-1),G=["innerHTML"],X={key:0,class:"vpnp-notification-content"},j={class:"vpnp-notification-content-text"},K=["innerHTML"],W=["innerHTML"],Z={__name:"AndroidPreview",props:{textApplicationName:{type:String,default:"App name"},textTime:{type:String,default:"1h",validator:t=>t.length<4},textTitle:{type:String,default:""},textBody:{type:String,default:""},height:{type:Number,default:l.PIXEL_4_HEIGHT},isVisibleToggler:{type:Boolean,default:!1},image:{type:String,default:""},backgroundImage:{type:String,default:""},backgroundColor:{type:String,default:"#c1c1c1"},appearanceMode:{type:String,default:a.LIGHT,validator:t=>Object.values(a).indexOf(t)!==-1}},setup(t){const n=t,{notificationImageStyle:r,backgroundStyle:g,appearanceModeClass:h,hasTitle:s,hasBody:d,hasImage:p,isExpanded:_,notificationExpandedClass:E}=N({image:e.toRef(n,"image"),backgroundImage:e.toRef(n,"backgroundImage"),backgroundColor:e.toRef(n,"backgroundColor"),appearanceMode:e.toRef(n,"appearanceMode"),textTitle:e.toRef(n,"textTitle"),textBody:e.toRef(n,"textBody")}),m=e.computed(()=>({height:`${n.height}px`,width:`${n.height*(l.PIXEL_4_WIDTH/l.PIXEL_4_HEIGHT)}px`})),c=e.computed(()=>s.value||d.value||p.value);return(i,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vpnp-wrapper-pixel_4"]),style:e.normalizeStyle([e.unref(g),m.value])},[e.createElementVNode("div",A,[e.createElementVNode("div",P,[e.createElementVNode("div",$,[e.renderSlot(i.$slots,"header")]),e.createElementVNode("div",{class:e.normalizeClass(["vpnp-notification",e.unref(h),e.unref(E)])},[e.createElementVNode("div",O,[R,e.createElementVNode("p",{class:"vpnp-notification-application-name",innerHTML:t.textApplicationName},null,8,z),e.createElementVNode("div",D,[w,e.createElementVNode("p",{class:"vpnp-notification-application-time",innerHTML:t.textTime},null,8,G)]),t.isVisibleToggler?(e.openBlock(),e.createElementBlock("a",{key:0,class:"vpnp-notification-toggler",onClick:f[0]||(f[0]=(...q)=>i.toggleNotification&&i.toggleNotification(...q))},[e.createElementVNode("i",{class:e.normalizeClass(["vpnp-notification-toggler-arrow",e.unref(_)?"up":"down"])},null,2)])):e.createCommentVNode("",!0)]),c.value?(e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("div",j,[e.unref(s)?(e.openBlock(),e.createElementBlock("p",{key:0,class:"vpnp-notification-title",innerHTML:t.textTitle},null,8,K)):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:1,class:"vpnp-notification-body",innerHTML:t.textBody},null,8,W)):e.createCommentVNode("",!0)]),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vpnp-notification-content-image",style:e.normalizeStyle([e.unref(r)])},null,4)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)])])],4))}};o.AndroidPreview=Z,o.IphonePreview=M,o.VPNP_APPEARANCE_MODE=a,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});