1"use strict";(self.webpackChunkmatkahuolto_web=self.webpackChunkmatkahuolto_web||[]).push([[2315],{63603:function(e,t,o){var l=o(52531),a=o(66835);t.A=e=>(0,l.Y)(a.az,Object.assign({sx:{p:3,mb:3,bg:"paleYellow",borderRadius:1,lineHeight:"normal"}},e),e.children)},38289:function(e,t,o){o.r(t);var l=o(45458),a=o(52531),n=o(66835),r=o(98993),i=o(96540),c=o(61225),s=o(11541),d=o(63603),u=o(50529),p=o(10517),f=o(336),b=o(32555),h=o(69764),Y=o(21721),g=o(21978),y=o(14549),x=o(42174),C=o(69086),m=o(32389);const k=e=>{let{children:t}=e;return(0,a.Y)(r.IE.p,{sx:{p:[4],color:"gray",textAlign:"center"}},t)},A=()=>{const{t:e,i18n:t}=(0,m.Bd)(),o=t.language,r=(0,c.wA)(),{0:p,1:b}=(0,i.useState)(!1),{0:x,1:A}=(0,i.useState)([]),w=(0,c.d4)((e=>e.basket.departurePoint)),P=w&&!!x.find((e=>e.officeCode===w.officeCode)),S=w&&!P?[w].concat((0,l.A)(x)):x,v=(0,i.useCallback)((()=>{r((0,y.I8)("/sender"))}),[r]),z=(0,i.useCallback)((async e=>{const t=e.postalCode,l=e.streetAddress;b(!0);let a=[];a=await(0,C.YA)({postcode:t,street:l,language:o}),b(!1),A(a)}),[A,b,o]);return(0,a.Y)(n.so,{sx:{flex:["auto",null,"none"],flexDirection:"column",justifyContent:"space-between",maxWidth:640}},(0,a.Y)(d.A,null,e("departurePlace.note")),(0,a.Y)(n.az,{sx:{flex:"auto",my:3}},(0,a.Y)("div",{sx:{border:0,borderBottomColor:"secondary",borderBottomStyle:"solid",borderBottomWidth:1,borderRadius:0}},(0,a.Y)(f.WI,{sx:{display:"inline-block"}}),(0,a.Y)(s.A,{placeholder:e("buyParcel.pickup.search"),styles:{container:e=>({...e,display:"inline-block",width:"calc(100% - 40px)",verticalAlign:"bottom"}),control:e=>({...e,border:"none",boxShadow:"none"}),indicatorsContainer:e=>({display:"none"})},loadOptions:e=>(0,C.BP)(e,o),getOptionLabel:e=>e.name,isOptionSelected:()=>!1,onChange:z,noOptionsMessage:()=>null,loadingMessage:()=>(0,a.Y)(n.az,{sx:{py:2}},(0,a.Y)(h.A,null))})),(0,a.Y)(n.az,{sx:{mt:2}},p?(0,a.Y)(h.A,null):w||0!==x.length?S.map((e=>(0,a.Y)(Y.A,{key:e.officeCode,servicePoint:e,isSelected:w&&e.officeCode===w.officeCode,onSelect:()=>{r((0,g.XY)(e))}}))):(0,a.Y)(k,null,e("buyParcel.repack.officeSearchNote")))),(0,a.Y)(n.so,{sx:{justifyContent:["flex-end",null,"flex-start"],mt:3}},(0,a.Y)(u.A,{disabled:!w,onClick:v},e("buyParcel.continue"))))};t.default=e=>{let{pageContext:t}=e;x.LM("paketit");const{t:o}=(0,m.Bd)(),l=(0,c.wA)(),s=(0,i.useCallback)((()=>l((0,y.I8)("/shopping-cart"))),[l]);return(0,a.Y)(b.A,{title:o("departurePlace.title"),paths:t.paths,locale:t.locale||"en",checkShopDisturbance:!0,showNavigation:!1},(0,a.Y)(n.mc,null,(0,a.Y)(p.A,null,(0,a.Y)(n.az,null,(0,a.Y)(u.A,{onClick:s,variant:"plain",sx:{color:"primary"}},o("buyParcel.backButton"))),(0,a.Y)(r.IE.h1,{sx:{color:"secondary",mt:0}},o("departurePlace.title")),(0,a.Y)(A,null))))}},21721:function(e,t,o){var l=o(32389),a=o(52531),n=o(66835);t.A=e=>{let{servicePoint:t,isSelected:o,onSelect:r,...i}=e;const{t:c}=(0,l.Bd)(),s=!!(t.officeStreetAddress||t.officePostalCode||t.officeCity);return(0,a.Y)(n.az,Object.assign({},i,{sx:{py:12,px:3,borderTopWidth:"1px",borderTopStyle:"solid",bg:o?"primary":"white",color:o?"white":"text",cursor:"pointer",lineHeight:"heading",":first-of-type":{border:0},"& + div":{borderTopColor:o?"transparent":"border"},":hover":{bg:o?"primary":"blueLighter"}},onClick:r}),(0,a.Y)(n.az,{sx:{fontWeight:"medium"}},(e=>e&&e.replace("MH-asiamies",c("buyParcel.pickup.agent")))(t.officeName)),s&&(0,a.Y)(n.az,null,t.officeStreetAddress,", ",t.officePostalCode," ",t.officeCity))}}}]); 2//# sourceMappingURL=component---src-pages-departure-place-js-798de2f17146ccb77c6d.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.