/*! @version pwa-studio: 14.1.0, @magento/venia-ui: ~11.5.0, @magento/pwa-theme-venia: ~2.4.0, @magento/pwa-buildpack: ~11.5.3, @magento/peregrine: ~14.4.1, @magento/pagebuilder: ~9.3.2, @magento/eslint-config: ~1.5.0, @magento/babel-preset-peregrine: ~1.3.3, @apollo/client: ~3.5.0 */
(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{"7cHv":function(e,a,l){"use strict"
l.r(a)
var t=l("phjM")
l.d(a,"default",function(){return t.a})},bJrA:function(e,a,l){"use strict"
var t=l("PBB4"),n=l.n(t)()(function(e){return e[1]})
n.push([e.i,".blogCarousel-root-B0p {\n --slide-size: 19.047rem;\n --slide-size-2xl: calc(25vw - 2.5rem);\n}\n\n.blogCarousel-carouselOuter-YRV {\n}\n\n.blogCarousel-blogCarouselContainer-lf9 {\n}\n\n.blogCarousel-blogSlide-CuU {\n\n width: var(--slide-size);\n}\n\n.blogCarousel-imageContainer-VMa {\n}\n\n.blogCarousel-carouselHeader-5z0 {\n}\n\n.blogCarousel-blogCarouselTitle-T4c {\n}\n\n.blogCarousel-blogLink-fkl {\n}\n\n.blogCarousel-link-l4l {\n}\n\n.blogCarousel-blogHomePage-qeX {\n}\n\n.blogCarousel-description-9L7 {\n}\n\n.blogCarousel-navigationWrapper--Bc {\n}\n\n.blogCarousel-buttonWrapper-736 {\n}\n\n.blogCarousel-button-arZ {\n}\n\n.blogCarousel-buttonHovered-Lsh {\n}\n\n@media (min-width: 1280px) {\n .blogCarousel-blogSlide-CuU {\n width: var(--slide-size-2xl);\n }\n}\n",""]),n.locals={root:"blogCarousel-root-B0p w-full max-w-site mx-auto site-gutter",carouselOuter:"blogCarousel-carouselOuter-YRV overflow-hidden w-full pl-4 pr-5 pt-6 pb-5 relative 2xl_px-0",blogCarouselContainer:"blogCarousel-blogCarouselContainer-lf9 grid auto-cols-max grid-flow-col gap-2 2xl_gap-1",blogSlide:"blogCarousel-blogSlide-CuU gap-5 relative max-w-[27.3125rem]",imageContainer:"blogCarousel-imageContainer-VMa flex flex-col",carouselHeader:"blogCarousel-carouselHeader-5z0 flex flex-col justify-between items-start gap-2 mt-2 max-w-site mx-auto lg_items-center lg_flex-row",blogCarouselTitle:"blogCarousel-blogCarouselTitle-T4c text-xl font-bold leading-heading pt-8 pb-2 pl-4 2xl_pt-20 2xl_pl-6 max_pl-0",blogLink:"blogCarousel-blogLink-fkl text-sm leading-heading no-underline 2xl_text-md",link:"blogCarousel-link-l4l no-underline",blogHomePage:"blogCarousel-blogHomePage-qeX inline-flex gap-1 text-sm leading-heading 2xl_text-md",description:"blogCarousel-description-9L7 text-sm line-clamp-2 h-auto my-2 2xl_my-4 2xl_text-md",navigationWrapper:"blogCarousel-navigationWrapper--Bc inline-flex items-center justify-between gap-2 w-full px-4 lg_w-auto 2xl_pt-20 2xl_pr-6 max_pr-0",buttonWrapper:"blogCarousel-buttonWrapper-736 hidden 2xl_flex",button:"blogCarousel-button-arZ min-w-10",buttonHovered:"blogCarousel-buttonHovered-Lsh visible focus_hidden"},a.a=n},phjM:function(e,a,l){"use strict"
l.d(a,"a",function(){return P})
var t=l("ddV6"),n=l.n(t),i=l("qklM"),o=l("ERkP"),r=l.n(o),s=l("aWzz"),u=l("KgAZ"),d=l("kQwz"),c=l("6sB8"),m=l("zCf4"),g=l("X5qW"),b=l("mE77"),p=l("31Ou"),v=l("GBwV"),C=l("vB0K"),k=l.n(C),f=l("bJrA"),x={injectType:"singletonStyleTag",insert:"head",singleton:!0},h=(k()(f.a,x),f.a.locals||{}),w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRecentPosts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pageSize"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allPosts"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blogPosts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pageSize"},value:{kind:"Variable",name:{kind:"Name",value:"pageSize"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"DESC",block:!1}]}},{kind:"Argument",name:{kind:"Name",value:"allPosts"},value:{kind:"Variable",name:{kind:"Name",value:"allPosts"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"post_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"post_url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"featured_image"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creation_time"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publish_time"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:353,source:{body:'\n query GetRecentPosts($pageSize: Int, $allPosts: Boolean) {\n blogPosts(pageSize: $pageSize, sort: ["DESC"], allPosts: $allPosts) {\n items {\n post_id\n title\n post_url\n featured_image\n creation_time\n publish_time\n }\n }\n }\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},N=l("D7o8"),E=l("ttDF"),y=function BlogCarouselShimmer(e){var a=Object(p.a)(h,e.classes)
return r.a.createElement(o.Fragment,null,r.a.createElement("div",{className:a.carouselHeader},r.a.createElement(E.a,{width:"250px",height:"1.25rem"}),r.a.createElement("div",{className:a.navigationWrapper},r.a.createElement(E.a,{width:"150px",height:"1rem"}),r.a.createElement("span",{className:a.buttonWrapper},r.a.createElement(E.a,{width:"40px",height:"40px",style:{borderRadius:"4px"}}),r.a.createElement(E.a,{width:"40px",height:"40px",style:{borderRadius:"4px"}})))),r.a.createElement("div",{className:a.root},r.a.createElement("div",{className:a.blogCarouselContainer},Array.from({length:4}).map(function(e,l){return r.a.createElement("div",{className:a.blogSlide,key:"shimmer-".concat(l)},r.a.createElement(E.a,{width:"100%",height:"200px"}),r.a.createElement(E.a,{width:"100%",height:"40px",style:{marginTop:"0.5rem"}}))}))))},z=function BlogCarouselItem(e){var a=e.item,l=e.classes,t=e.index
if(!a)return null
var n="blog-slide-".concat(null==a?void 0:a.post_id,"-").concat(t),i=null==a?void 0:a.post_url
return r.a.createElement("div",{className:l.blogSlide,key:n},r.a.createElement(b.a,{to:i,"aria-label":null==a?void 0:a.title,className:l.link,rel:"nofollow"},r.a.createElement("img",{src:null==a?void 0:a.featured_image,alt:"".concat(null==a?void 0:a.title.slice(0,20),"..."),key:null==a?void 0:a.post_id,placeholder:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNSAxOCcgd2lkdGg9JzI1JyBoZWlnaHQ9JzE4Jz48cmVjdCB3aWR0aD0nMjUnIGhlaWdodD0nMTgnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg==",loading:"lazy",width:450,height:324}),r.a.createElement("p",{className:l.description},null==a?void 0:a.title)))}
z.propTypes={item:Object(s.shape)({post_url:s.string,title:s.string,featured_image:s.string}).isRequired,classes:s.object.isRequired,index:s.number.isRequired}
var _=z,P=function BlogCarousel(e){var a=e.title,l=e.id,t=e.allPosts,s=e.classes,C=Object(d.a)().formatMessage,k=Object(i.a)(),f=n()(k,2),x=f[0],E=f[1],z=Object(N.a)(),P=z.isCheckout,S=z.isCart,j=z.isSignInPage,B=Object(N.a)("/blog").isPath,O=Object(m.j)({path:"/blog/category/",exact:!1,strict:!1}),M=function useBlogCarousel(e){var a=e.id,l=e.classes,t=Object(p.a)(h,l),n=Object(v.a)(w,{variables:{pageSize:10}}),i=n.data,o=n.loading,r=n.error
return o?{data:null,id:a,classes:t,loading:o,error:null}:r?{data:null,id:a,classes:t,loading:!1,error:r}:{data:i||null,id:a,classes:t,loading:!1,error:null}}({id:l,allPosts:t,classes:s}),H=M.data,W=M.loading,V=(M.error,M.classes),L=Object(o.useCallback)(function(){E&&E.scrollPrev()},[E]),T=Object(o.useCallback)(function(){E&&E.scrollNext()},[E]),A=Object(o.useMemo)(function(){var e,a
return null!=H&&null!==(e=H.blogPosts)&&void 0!==e&&e.items?null==H?void 0:null===(a=H.blogPosts)||void 0===a?void 0:a.items.map(function(e,a){return r.a.createElement(_,{key:"blog-item-".concat(a,"-").concat((null==e?void 0:e.id)||(null==e?void 0:e.key)||"item"),item:e,classes:V,index:a})}).filter(Boolean):[]},[H,V]),D=C({id:"blogCarousel.ariaLabelNext",defaultMessage:"Przewiń wstecz"}),R=C({id:"blogCarousel.ariaLabelPrev",defaultMessage:"Przewiń w przód"}),F=C({id:"blogCarousel.ariaLabelCarousel",defaultMessage:"Poznaj nasze wpisu blogowe"})
if(W)return r.a.createElement(y,{classes:s})
var q=a?titleclear:r.a.createElement(c.a,{id:"blogCarousel.title",defaultMessage:"Zobacz nasze artykuły "}),J=r.a.createElement(c.a,{id:"blogCarousel.viewAllLink",defaultMessage:"Sprawdź nasze wpisy"})
return A.length?!(P||B||S||O||j)?r.a.createElement(o.Fragment,null,r.a.createElement("div",{className:V.carouselHeader},r.a.createElement("p",{className:V.blogCarouselTitle},q),r.a.createElement("div",{className:V.navigationWrapper},r.a.createElement("span",{className:V.buttonWrapper},r.a.createElement(g.a,{className:V.button,onClick:L,"aria-label":R,type:"button"},r.a.createElement(u.x,{size:26})),r.a.createElement(g.a,{className:V.button,onClick:T,"aria-label":D,type:"button"},r.a.createElement(u.y,{size:26}))),r.a.createElement(b.a,{to:"/blog",className:V.blogHomePage,rel:"nofollow"},r.a.createElement("p",null,J)))),r.a.createElement("div",{className:V.root},r.a.createElement("div",{className:V.carouselOuter,ref:x,"aria-label":F},r.a.createElement("div",{className:V.blogCarouselContainer},A)))):null:r.a.createElement("div",{className:V.emptyContainer||V.root},r.a.createElement("p",{className:V.emptyMessage},r.a.createElement(c.a,{id:"blogCarousel.noItems",defaultMessage:"Brak wpisów blogowych do wyświetlenia."})))}
P.propTypes={id:s.string,popular:s.bool,classes:s.object,title:s.string}}}])
//# sourceMappingURL=83.f5bd6cafa9e8801c8ede.js.map