1import{_ as p,r,R as b,c as g}from"./app.6-zBPm55.js";import{d as n,y as a,h as m,w as y,B as v,K as N,u as s,H as l,f as k,x as _,M as C,b as u,N as w,A as T}from"./vendor.kmuNf4Gr.js";/* empty css */g(["XGlobalNotifications.mounted"]);const d="spl_global_notification_add_event",G={name:"XGlobalNotifications",mounted(...o){return r("XGlobalNotifications.mounted",()=>{typeof remove_socket_listener=="function"&&remove_socket_listener(d,this.add),typeof add_socket_listener=="function"&&add_socket_listener(d,this.add)},this,o)},computed:{...T("global_notifications_store",["getNotifications","interceptors"]),limitedNotifications(){return this.getNotifications.filter((o,t)=>t<5)}},methods:{...w("global_notifications_store",[b]),...u("global_notifications_store",["showNotify"]),...u("tabs_store",["switchTab","clearTab"]),add(...o){return r("XGlobalNotifications.add",t=>{this.interceptors[t.type]&&!this.interceptors[t.type].interceptor(t)||this.showNotify(t)},this,o)},remove(...o){return r("XGlobalNotifications.remove",t=>{this.REMOVE_NOTIFICATION(t)},this,o)},runAction(...o){return r("XGlobalNotifications.runAction",t=>{typeof t.action_button.action=="function"?t.action_button.action():typeof t.action_button.action=="string"?switch_page(t.action_button.action):(switch_page(t.action_button.redirect_url,!1,!0),this.getHash()),this.remove(t.id)},this,o)},getHash(...o){return r("XGlobalNotifications.getHash",()=>{if(this.$route.hash){let{hash:t}=this.$route;this.switchTab(t.substring(1)),this.$nextTick(()=>{this.clearTab()})}},this,o)}}},x={class:"toasters-wrap"},O=["onClick"],A=["innerHTML"],E={key:0,class:"toaster-buttons"},I=["onClick","textContent"],X=["onClick","textContent"],V={key:1,class:"toaster-buttons"},$=["onClick"];function H(o,t,f,L,M,i){return n(),a("div",x,[m(C,{name:"fade",tag:"span"},{default:y(()=>[(n(!0),a(v,null,N(i.limitedNotifications,(e,h)=>(n(),a("div",{key:`key-${h}`,class:"toaster","data-test-selector":"message-item"},[s("div",{class:"toaster-content","data-test-selector":"toaster-content",onClick:c=>i.remove(e.id)},[e.type!=="text"?(n(),a("span",{key:0,"data-test-selector":"message-color",class:l({"icon-wrap":!0,"color-danger":e.type==="error","color-warning":e.type==="warning","color-success":e.type==="success","color-info":e.type==="info"})},[s("i",{"data-test-selector":"message-icon",class:l({"icon-ic_fluent_error_circle_24_regular":e.type==="error","icon-ic_fluent_warning_24_regular":e.type==="warning","icon-ic_fluent_checkmark_circle_24_regular":e.type==="success","icon-ic_fluent_info_12_regular":e.type==="info"})},null,2)],2)):k("",!0),s("div",{"data-test-selector":"message-text",innerHTML:e.message},null,8,A)],8,O),e.action_button?(n(),a("div",E,[s("a",{href:"javascript:void(0)",class:"toaster-button","data-test-selector":"message-action-remove-button",onClick:c=>i.remove(e.id),textContent:_(e.close_button?e.close_button.name:o.t("common","Skip"))},null,8,I),s("a",{href:"javascript:void(0)",class:"toaster-button-primary","data-test-selector":"message-action-button",onClick:c=>i.runAction(e),textContent:_(e.action_button.name?e.action_button.name:o.t("common","View"))},null,8,X)])):(n(),a("div",V,[s("a",{href:"javascript:void(0)",class:"toaster-button-icon","data-test-selector":"message-remove-button",onClick:c=>i.remove(e.id)},[...t[0]||(t[0]=[s("span",{class:"icon-wrap"},[s("i",{class:"icon-ic_fluent_dismiss_24_regular"})],-1)])],8,$)]))]))),128))]),_:1})])}const R=p(G,[["render",H]]);export{R as XGlobalNotification,R as default}; 2//# sourceMappingURL=index.DllowsLB.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.