import{a as A}from"./chunk-5PU34A2B.js";import{a as P}from"./chunk-V5O2TXLS.js";import{a as W}from"./chunk-KVG6CKMN.js";import{a as D}from"./chunk-W45AUQWS.js";import"./chunk-SPNVV2KO.js";import"./chunk-BGV4AOSB.js";import"./chunk-2SZ4MB2K.js";import{i as $}from"./chunk-N7PC5CHF.js";import"./chunk-ZTKV4AIV.js";import{c as L}from"./chunk-5JDCLYZA.js";import{j as B}from"./chunk-YJYOGSOO.js";import{h as w}from"./chunk-73IMXZSJ.js";import"./chunk-KVTHJWZA.js";import{Ab as x,Bc as I,Ic as c,Jc as d,Ob as C,Qb as T,Rb as y,Sb as i,Tb as n,Ub as s,Z as g,aa as u,hb as l,jc as k,na as b,qa as S,u as f,v,vc as o,wc as m,xc as _,yc as E}from"./chunk-FWZCAEAJ.js";import"./chunk-CWTPBX7D.js";var j=(e,t)=>t.name;function F(e,t){if(e&1&&(i(0,"li",6)(1,"div",7)(2,"span",8),o(3),n(),i(4,"div",9),o(5),n()(),i(6,"div",10)(7,"small"),o(8),c(9,"currency"),n(),i(10,"span"),o(11),c(12,"currency"),n()()()),e&2){let p=t.$implicit;l(3),_("",p.amount,"x"),l(2),m(p.name),l(3),_("(",d(9,4,p.pricePerPiece)," / Stk.)"),l(3),m(d(12,6,p.priceSum))}}function M(e,t){if(e&1&&(i(0,"h4",3),o(1,"Offene Rechnung:"),n(),i(2,"ul",4),T(3,F,13,8,"li",11,j),n(),s(5,"hr"),i(6,"div",5)(7,"span"),o(8,"Gesamt:"),n(),i(9,"span"),o(10),c(11,"currency"),n()(),s(12,"hr")),e&2){let p=k();l(3),y(p.bill.implodedOrderProducts),l(7),m(d(11,1,p.bill.priceSum))}}function O(e,t){e&1&&(i(0,"div",12),o(1,"Alles bezahlt :)"),n())}function G(e,t){e&1&&(i(0,"h1",0),o(1," Tisch "),i(2,"b"),o(3),n()(),x(4,M,13,3)(5,O,2,0),i(6,"div",1)(7,"button",2),o(8),c(9,"tr"),n()()),e&2&&(l(3),E("",t.table.group.name," - ",t.table.number,""),l(),C(4,t.bill.implodedOrderProducts.length>0?4:5),l(4),m(d(9,4,"GO_BACK")))}function z(e,t){e&1&&s(0,"app-spinner-row")}var ne=(()=>{let t=class t{constructor(){this.httpClient=b(w),this.publicId$=b($).paramMap.pipe(f(a=>a.get("publicId")),D(),g(1)),this.vm$=L(v([this.publicId$.pipe(u(a=>this.httpClient.get(`/public/table/${a}`))),this.publicId$.pipe(u(a=>this.httpClient.get(`/public/table/${a}/bill`)))]).pipe(f(([a,r])=>({table:a,bill:r}))))}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=S({type:t,selectors:[["app-mobile-link-table"]],standalone:!0,features:[I],decls:2,vars:1,consts:[[1,"text-center"],[1,"mt-3","d-flex","flex-column","flex-md-row","justify-content-between","gap-2"],["back","",1,"btn","btn-secondary","btn-sm"],[1,"my-3"],[1,"list-group"],[1,"d-flex","justify-content-between","px-2"],[1,"list-group-item"],[1,"d-flex","gap-2","align-items-center"],[1,"badge","bg-secondary","rounded-pill"],[1,"fw-bold"],[1,"d-flex","justify-content-between","align-items-center"],["class","list-group-item"],[1,"text-center","mt-4","mb-5"]],template:function(r,R){if(r&1&&x(0,G,10,6)(1,z,1,0),r&2){let h;C(0,(h=R.vm$())?0:1,h)}},dependencies:[B,A,W,P],encapsulation:2,changeDetection:0});let e=t;return e})();export{ne as WebLinkTableComponent};
