-
Notifications
You must be signed in to change notification settings - Fork 0
/
chunk-FQ22YK3U.js
1 lines (1 loc) · 4.73 KB
/
chunk-FQ22YK3U.js
1
import{a as J,b as Q,c as X,f as Z,i as ee,j as te,m as ie}from"./chunk-OYOJDGFY.js";import"./chunk-MXT3O4VA.js";import"./chunk-XBDSX75X.js";import"./chunk-YBC3GFJ3.js";import"./chunk-WEZ63LNF.js";import{Ba as d,Da as b,E as N,Ga as m,Ha as S,Ia as D,Ja as g,Ka as s,La as r,Lb as z,Ma as _,Na as F,Oa as P,P as V,Qa as u,Sa as I,Ta as l,Vd as O,Ve as q,W as h,X as C,Xd as K,_d as Y,a as R,b as B,c as $,fb as f,hb as L,j as k,kb as v,la as p,lb as A,m as M,mb as E,ob as W,sb as w,tb as x,ua as H,ue as j,uf as G,xa as c}from"./chunk-A6GZZ5JF.js";function ae(e,n){if(e&1&&_(0,"app-shop-item-data-details",1),e&2){let t=l();d("shopItemData",t.selectedEntity)}}function oe(e,n){if(e&1&&_(0,"app-animal-details",2),e&2){let t=l();d("mappedAnimalShopData",t.selectedAnimal)}}function le(e,n){e&1&&_(0,"app-opening-hours",7),e&2&&d("openingHours",n)}function pe(e,n){if(e&1&&(c(0,le,1,1,"app-opening-hours",7),w(1,"async")),e&2){let t,i=l();m((t=x(1,1,i.openingHours$))?0:-1,t)}}function re(e,n){if(e&1){let t=u();s(0,"app-item-icon",12),I("click",function(){let o=h(t).$implicit,a=l(4);return C(a.showDetails(o))}),r()}if(e&2){let t=n.$implicit,i=l(4);b("selected-icon",(i.selectedEntity==null||i.selectedEntity.item==null?null:i.selectedEntity.item.id)===t.item.id),d("itemName",t.item.iconName)}}function me(e,n){if(e&1&&(s(0,"div",9),D(1,re,1,3,"app-item-icon",11,S),r()),e&2){let t=l();p(),g(t)}}function se(e,n){if(e&1&&_(0,"app-shop-item-data-table",10),e&2){let t=l();d("dataSource",t)}}function ce(e,n){if(e&1){let t=u();s(0,"app-data-filter",8),E("showTableChange",function(o){h(t);let a=l(2);return A(a.showTable,o)||(a.showTable=o),C(o)}),r(),c(1,me,3,0,"div",9)(2,se,1,1,"app-shop-item-data-table",10)}if(e&2){let t=l(2);v("showTable",t.showTable),p(),m(t.showTable?-1:1),p(),m(t.showTable?2:-1)}}function de(e,n){if(e&1&&(s(0,"h2",5),f(1,"Stock list"),r(),c(2,ce,3,3),w(3,"async")),e&2){let t,i=l();p(2),m((t=x(3,1,i.shopItemData$))?2:-1,t)}}function _e(e,n){if(e&1){let t=u();s(0,"app-item-icon",12),I("click",function(){let o=h(t).$implicit,a=l(3);return C(a.showAnimal(o))}),r()}if(e&2){let t,i=n.$implicit,o=l(3);b("selected-icon",(o.selectedAnimal==null?null:o.selectedAnimal.key)===i.key),d("itemName",(t=i.animal==null||i.animal.variants==null||i.animal.variants[0]==null||i.animal.variants[0].icons==null?null:i.animal.variants[0].icons.adult)!==null&&t!==void 0?t:null)}}function he(e,n){if(e&1&&(s(0,"div",9),D(1,_e,1,3,"app-item-icon",11,S),r()),e&2){let t=l();p(),g(t)}}function Ce(e,n){if(e&1){let t=u();s(0,"app-data-filter",8),E("showTableChange",function(o){h(t);let a=l();return A(a.showTable,o)||(a.showTable=o),C(o)}),r(),c(1,he,3,0,"div",9)}if(e&2){let t=l();v("showTable",t.showTable),p(),m(t.showTable?-1:1)}}function ue(e,n){e&1&&_(0,"app-animal-mood-table",6),e&2&&d("productSizeByMood",n)}var $e=(()=>{let n=class n extends J{constructor(){super(),this.shopName="underwater-ranch",this.openingHours$=this._database.fetchOpeningHours$(this.shopName),this.sizeByMood$=this._database.fetchAnimalMoodData$(),this.animalData$=M([this._database.fetchAnimals$(),this._database.fetchAnimalShopData$(this.shopName)]).pipe(N(([i,o])=>k(o.map(a=>{let U=a,{animalKey:y}=U,T=$(U,["animalKey"]);return B(R({},T),{animal:i.find(ne=>ne.key===y)})}))))}showDetails(i){super.showDetails(i),this.selectedAnimal=void 0}showAnimal(i){this.selectedAnimal=i,this.selectedEntity=void 0,this.listDetail.open()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=V({type:n,selectors:[["app-underwater-ranch"]],standalone:!0,features:[H,W],decls:18,vars:12,consts:[["listDetail",""],[3,"shopItemData"],[3,"mappedAnimalShopData"],[1,"mb-4","font-semibold","text-3xl","text-black","flex","items-center","gap-x-4"],[3,"uiIcon"],[1,"mt-6","mb-3","font-semibold","text-2xl","text-white"],[3,"productSizeByMood"],[3,"openingHours"],[3,"showTableChange","showTable"],[1,"icon-grid"],[3,"dataSource"],[1,"icon-grid-item",3,"selected-icon","itemName"],[1,"icon-grid-item",3,"click","itemName"]],template:function(o,a){if(o&1&&(s(0,"app-list-detail-container"),F(1,0),c(2,ae,1,1,"app-shop-item-data-details",1)(3,oe,1,1,"app-animal-details",2),P(),s(4,"app-card")(5,"h1",3),_(6,"app-ui-icon",4),f(7),r(),c(8,pe,2,3),r(),c(9,de,4,3),s(10,"h2",5),f(11,"Animals"),r(),c(12,Ce,2,2),w(13,"async"),s(14,"h2",5),f(15,"Animal product size per mood and hearts"),r(),c(16,ue,1,1,"app-animal-mood-table",6),w(17,"async"),r()),o&2){let y,T;p(2),m(a.selectedEntity?2:-1),p(),m(a.selectedAnimal?3:-1),p(3),d("uiIcon",a.SHOP_ICONS[a.shopName]),p(),L(" ",a.SHOP_DISPLAY_NAMES[a.shopName]," "),p(),m(a.openingHours$?8:-1),p(),m(a.shopItemData$?9:-1),p(3),m((y=x(13,8,a.animalData$))?12:-1,y),p(4),m((T=x(17,10,a.sizeByMood$))?16:-1,T)}},dependencies:[ie,X,Z,Q,te,ee,G,K,Y,j,q,z,O],encapsulation:2});let e=n;return e})();export{$e as UnderwaterRanchComponent};