import{a as g,b as h}from"./chunk-CSXLMRP6.js";import{a as D}from"./chunk-JF4EW7UO.js";import{n as l,o as f,q as n}from"./chunk-WBFVEEB2.js";import{ja as p,l as o}from"./chunk-PWOPM3YG.js";import{a as d,b as m,f as S}from"./chunk-NZN5XTIE.js";var a=S(D());var u={type:"graafmelding",activities:[],startDate:(0,a.default)().add(3,"days").toDate().toString(),endDate:(0,a.default)().add(10,"days").toDate().toString(),executionDate:(0,a.default)().toDate().toString(),geometries:[],informationPolygonGeometries:[],addedOn:new Date().toString(),closestAddresses:[],selectHouseConnections:!1,selectedHouseConnections:[],notitie:"",reference:"",projectId:null},i,t=(i=class{static type(e){return e.type}static activities(e){return e.activities}static reference(e){return e.reference}static notitie(e){return e.notitie}static startDate(e){return e.startDate}static endDate(e){return e.endDate}static executionDate(e){return e.executionDate}static geometries(e){return e.geometries}static informationPolygonGeometries(e){return e.informationPolygonGeometries}static closestAddresses(e){return e.closestAddresses}static selectHouseConnections(e){return e.selectHouseConnections}static selectedHouseConnections(e){return e.selectedHouseConnections}static projectId(e){return e.projectId}static shouldReset(e){return(0,a.default)(e.addedOn).diff((0,a.default)(),"hours")>12}static orderItems(e){let s=(e.selectedHouseConnections||[]).map(r=>({BAGid:r.adresseerbaarobject_id,openbareRuimteNaam:r.straatnaam,huisnummer:r.huisnummer.toString(),huisletter:r.huisletter,huisnummertoevoeging:r.huisnummertoevoeging,woonplaatsNaam:r.woonplaatsnaam,postcode:r.postcode,landcode:"http://publications.europa.eu/resource/authority/country/NLD"}));return e.geometries.map((r,c)=>({type:e.type,activities:e.activities,startDate:e.startDate,endDate:e.endDate,geometry:r,informationPolygonGeometry:e.informationPolygonGeometries.length>0?e.informationPolygonGeometries[0]:null,closestAddressId:e.closestAddresses[c].closestAddressId,locatieWerkzaamheden:e.closestAddresses[c].locatieWerkzaamheden,notitie:e.notitie,reference:e.reference,huisaansluitingAdressen:s}))}constructor(){}setShoppingCartState(e,s){e.patchState(s.payload)}resetShop(e,s){if(s.payload.remember_klic_order_details){let r=e.getState().activities,c=e.getState().reference,y=e.getState().notitie;e.setState(m(d({},u),{activities:r,reference:c,notitie:y}))}else e.setState(u)}},i.\u0275fac=function(s){return new(s||i)},i.\u0275prov=p({token:i,factory:i.\u0275fac}),i);o([l(g)],t.prototype,"setShoppingCartState",null);o([l(h)],t.prototype,"resetShop",null);o([n([t])],t,"type",null);o([n([t])],t,"activities",null);o([n([t])],t,"reference",null);o([n([t])],t,"notitie",null);o([n([t])],t,"startDate",null);o([n([t])],t,"endDate",null);o([n([t])],t,"executionDate",null);o([n([t])],t,"geometries",null);o([n([t])],t,"informationPolygonGeometries",null);o([n([t])],t,"closestAddresses",null);o([n([t])],t,"selectHouseConnections",null);o([n([t])],t,"selectedHouseConnections",null);o([n([t])],t,"projectId",null);o([n([t])],t,"shouldReset",null);o([n([t])],t,"orderItems",null);t=o([f({name:"shop_v3",defaults:u})],t);export{t as a};
//# sourceMappingURL=chunk-KAFEOT5M.js.map