"use strict";(self.webpackChunkwebpackWcBlocksCartCheckoutFrontendJsonp=self.webpackChunkwebpackWcBlocksCartCheckoutFrontendJsonp||[]).push([[6945],{7944:(e,t,c)=>{c.r(t),c.d(t,{default:()=>w});var a=c(1609),l=c(7723),o=c(6087),n=c(8223),s=c(6417),r=c(1759),i=c(8645),p=c(1e3),m=c(3835),u=c(5703),h=c(2516),d=c(7874);const g=()=>{const{shippingRates:e,isLoadingRates:t}=(0,i.V)();return(0,a.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},(0,a.createElement)("legend",{className:"screen-reader-text"},(0,l.__)("Shipping options","woocommerce")),(0,a.createElement)(d.A,{className:"wc-block-components-totals-shipping__options",shippingRates:e,isLoadingRates:t,context:"woocommerce/cart"}))},w=({className:e})=>{const{isEditor:t}=(0,r.m)(),{cartNeedsShipping:c,shippingRates:d}=(0,i.V)(),[w,_]=(0,o.useState)(!1);if(!c)return null;if(t&&0===(0,m.T4)(d))return null;const k=(0,u.getSetting)("isShippingCalculatorEnabled",!0)&&h.mH,C=(0,m.PU)(d);return(0,a.createElement)(p.TotalsWrapper,{className:e},(0,a.createElement)(s.S.Provider,{value:{showCalculator:k,shippingCalculatorID:"shipping-calculator-form-wrapper",isShippingCalculatorOpen:w,setIsShippingCalculatorOpen:_}},(0,a.createElement)(n.w7,{label:C?(0,l.__)("Pickup","woocommerce"):(0,l.__)("Delivery","woocommerce"),placeholder:k?null:(0,a.createElement)("span",{className:"wc-block-components-shipping-placeholder__value"},(0,l.__)("Calculated at checkout","woocommerce")),collaterals:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(g,null),!k&&(0,m.$u)(d)&&(0,a.createElement)("div",{className:"wc-block-components-totals-shipping__delivery-options-notice"},(0,l.__)("Delivery options will be calculated during checkout","woocommerce")))})))}}}]);