1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["CartFooterDiscountWrapper-public"],{
1"./npm-packages/@shopwp/components/src/cart/footer/discount-wrapper/index.jsx":(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var s=n("./npm-packages/@shopwp/components/src/shop/_state/hooks.js"),a=n("./npm-packages/@shopwp/components/src/cart/_state/hooks.js"),o=wp.element.lazy((function(){return Promise.resolve().then(n.bind(n,"./npm-packages/@shopwp/components/src/loader/index.jsx"))})),c=wp.element.lazy((function(){return n.e("CartFooterDiscount-public").then(n.bind(n,"./npm-packages/@shopwp/components/src/cart/footer/discount/index.jsx"))}));const p=function(e){e.onAddDiscount;var t,n,p,r,l=e.changeDiscount,i=(e.onKeyDown,e.discountCode),u=e.setDiscountCode;return t=wp.element.useRef,n=(0,a.J)(),p=(0,s.T)(),r=t(!1),React.createElement("div",{className:"swp-l-col swp-l-row-end swp-l-row-between swp-0 swp-mt15 swp-cart-footer-discount-row wps-discount-row"},React.createElement("div",{className:"swp-l-row swp-m-l-row swp-discount-row"},React.createElement("input",{className:"swp-discount-input",type:"text",placeholder:"Enter discount code",id:"swp-discount-input",ref:r,disabled:p.isCartUpdating||!p.cartData||!p.cartData.lines.edges.length,onKeyDown:function(e){"Enter"===e.key&&l(r.current.value.toUpperCase())},onChange:function(e){u(e.target.value)},value:i}),React.createElement("button",{className:"swp-cart-discount-button",tabIndex:"0",onClick:function(e){l(r.current.value.toUpperCase())},disabled:p.isCartUpdating||!p.cartData||!p.cartData.lines.edges.length||!i},n.isAddingDiscountCode?null:React.createElement("span",null,p.t.l.apply),n.isAddingDiscountCode?React.createElement(o,null):null)),React.createElement("div",{className:"swp-discount-code-wrap swp-mt10"},p.cartData.discountCodes.length?p.cartData.discountCodes.map((function(e){return e.applicable?React.createElement(c,{discount:e,changeDiscount:l,key:e.code}):null})):null))}}
1}]);
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.