"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6700],{6274:function(e,n,r){r.d(n,{Z:function(){return NavbarLinks_NavbarLinks}});var t=r(3067),o=r(4235),i=r(6355),a=r(4194),s=r(6652),c=r(9009),l=r(2614),u=r(3412),f=r(31),p=r(4018),b=r(6422),d=r(1549),RegionButton_RegionButton=function(e){var{icon:n,label:r}=e,{openModal:t,openPopover:o}=(0,s.l)(),{city:i,postalCode:v}=(0,f.kP)(),{isValidationComplete:j}=(0,b.g)(),h=(0,a.useRef)(null),k=!!(null!==u.session&&void 0!==u.session&&u.session.postalCode)&&v===u.session.postalCode||!v&&!u.deliveryPromise.mandatory;return(0,a.useEffect)(()=>{u.deliveryPromise.enabled&&j&&j&&k&&h.current&&o({isOpen:!0,triggerRef:h})},[j]),(0,d.jsx)(c.Z,{variant:"tertiary",size:"small",icon:(0,d.jsx)(l.Z,{name:n,width:18,height:18,weight:"bold"}),iconPosition:"left",onClick:t,ref:h,children:i&&v?"".concat((0,p._W)(i),", ").concat(v):r})},v=r(7345),j=r(9746),h=["links","onClickLink","region"];function ownKeys(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,t)}return r}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(r),!0).forEach(function(n){(0,t.Z)(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var NavbarLinks_NavbarLinks=function(e){var{links:n,onClickLink:r,region:{icon:t,label:a,shouldDisplayRegion:s}}=e,c=(0,o.Z)(e,h),{NavbarLinks:l,NavbarLinksList:u}=(0,j.r3)();return(0,d.jsx)(l.Component,_objectSpread(_objectSpread(_objectSpread({},c),l.props),{},{children:(0,d.jsxs)("div",{"data-fs-navbar-links-wrapper":!0,"data-fs-content":"navbar",children:[s&&(0,d.jsx)(RegionButton_RegionButton,{icon:t,label:a}),(0,d.jsx)(u.Component,_objectSpread(_objectSpread({},u.props),{},{children:n.map(e=>{var{url:n,text:t}=e;return(0,d.jsx)(i.Z,{children:(0,d.jsx)(v.Z,{variant:"display",href:n,prefetch:!1,onClick:r,children:t})},t)})}))]})}))}},6700:function(e,n,r){r.r(n),r.d(n,{default:function(){return t.Z}});var t=r(6274)},6355:function(e,n,r){var t=r(4194);let o=(0,t.forwardRef)(function({children:e,testId:n="fs-navbar-links-list-item",...r},o){return t.createElement("li",{"data-fs-navbar-links-list-item":!0,ref:o,"data-testid":n,...r},e)});n.Z=o}}]);