(()=>{var e,o,t,r={8428:(e,o,t)=>{"use strict";const r=window.wp.blocks;var c=t(3450),n=t(7092);const a=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/saved-for-later","version":"1.0.0","title":"Saved for Later","description":"Display items the shopper has saved from their cart for later.","category":"woocommerce","keywords":["WooCommerce","Saved for Later"],"textdomain":"woocommerce","attributes":{"columnCount":{"type":"number","default":5}},"allowedBlocks":["core/heading"],"supports":{"align":["wide","full"],"interactivity":true,"html":false,"reusable":false,"spacing":{"margin":true,"padding":true,"blockGap":true},"typography":{"fontSize":true,"lineHeight":true},"color":{"text":true,"background":true}},"viewScriptModule":"woocommerce/saved-for-later","style":["file:../woocommerce/saved-for-later-style.css","wc-blocks-style-product-image","woocommerce-product-price-style","woocommerce-product-button-style"]}');var i=t(7723);const s=window.wp.blockEditor,l=window.wp.components;var m=t(8592);const p=window.wc.wcSettings;var u=t(790);const d=[["core/heading",{content:(0,i.__)("Saved for later","woocommerce"),level:2}]],w=[{key:"preview-1",name:(0,i.__)("Sample product one","woocommerce"),variation:(0,i.__)("Size: M","woocommerce"),price:"$19.99",quantity:(0,i.__)("Qty: 2","woocommerce")},{key:"preview-2",name:(0,i.__)("Sample product two","woocommerce"),variation:(0,i.__)("Color: Blue","woocommerce"),price:"$29.99",quantity:(0,i.__)("Qty: 1","woocommerce")},{key:"preview-3",name:(0,i.__)("Sample product three","woocommerce"),variation:"",price:"$9.99",quantity:(0,i.__)("Qty: 3","woocommerce")},{key:"preview-4",name:(0,i.__)("Sample product four","woocommerce"),variation:(0,i.__)("Size: L","woocommerce"),price:"$24.99",quantity:(0,i.__)("Qty: 1","woocommerce")},{key:"preview-5",name:(0,i.__)("Sample product five","woocommerce"),variation:"",price:"$14.99",quantity:(0,i.__)("Qty: 2","woocommerce")},{key:"preview-6",name:(0,i.__)("Sample product six","woocommerce"),variation:(0,i.__)("Color: Red","woocommerce"),price:"$39.99",quantity:(0,i.__)("Qty: 1","woocommerce")}];t(9605),(0,r.registerBlockType)(a,{icon:{src:(0,u.jsx)(c.A,{icon:n.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const{columnCount:t}=e,r=(0,s.useBlockProps)({className:"wc-block-saved-for-later"}),n=(0,s.useInnerBlocksProps)({className:"wc-block-saved-for-later__header"},{template:d});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.InspectorControls,{children:(0,u.jsx)(l.PanelBody,{title:(0,i.__)("Settings","woocommerce"),children:(0,u.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Columns","woocommerce"),value:t,onChange:e=>{"number"==typeof e&&o({columnCount:e})},min:2,max:6})})}),(0,u.jsxs)("section",{...r,children:[(0,u.jsx)("div",{...n}),(0,u.jsx)("ul",{className:`wc-block-saved-for-later__list columns-${t}`,children:w.map(e=>(0,u.jsxs)("li",{className:"wc-block-shopper-list-item",children:[(0,u.jsxs)("div",{className:"wc-block-components-product-image wc-block-components-product-image--aspect-ratio-auto",children:[(0,u.jsx)("a",{href:"#preview",onClick:e=>e.preventDefault(),children:(0,u.jsx)("img",{src:p.PLACEHOLDER_IMG_SRC,alt:""})}),(0,u.jsx)("button",{type:"button",className:"wc-block-shopper-list-item__remove","aria-label":(0,i.sprintf)(/* translators: %s: product name. */ /* translators: %s: product name. */
(0,i.__)("Remove %s from Saved for later list","woocommerce"),e.name),disabled:!0,children:(0,u.jsx)(c.A,{icon:m.A,size:24})}),e.variation&&(0,u.jsx)("span",{className:"wc-block-shopper-list-item__variation",children:e.variation})]}),(0,u.jsx)("h2",{className:"wp-block-post-title has-text-align-center has-medium-font-size",children:(0,u.jsx)("a",{href:"#preview",onClick:e=>e.preventDefault(),children:e.name})}),(0,u.jsx)("div",{className:"price wc-block-components-product-price has-text-align-center has-small-font-size",children:(0,u.jsx)("span",{className:"wc-block-components-product-price__value",children:e.price})}),(0,u.jsx)("span",{className:"wc-block-shopper-list-item__quantity",children:e.quantity}),(0,u.jsx)("div",{className:"wp-block-button wc-block-components-product-button",children:(0,u.jsx)("button",{type:"button",className:"wp-block-button__link wp-element-button add_to_cart_button wc-block-components-product-button__button",disabled:!0,children:(0,i.__)("Move to cart","woocommerce")})})]},e.key))})]})]})},save:()=>(0,u.jsx)(s.InnerBlocks.Content,{})})},9605:()=>{},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},c={};function n(e){var o=c[e];if(void 0!==o)return o.exports;var t=c[e]={exports:{}};return r[e](t,t.exports,n),t.exports}n.m=r,e=[],n.O=(o,t,r,c)=>{if(!t){var a=1/0;for(m=0;m<e.length;m++){for(var[t,r,c]=e[m],i=!0,s=0;s<t.length;s++)(!1&c||a>=c)&&Object.keys(n.O).every(e=>n.O[e](t[s]))?t.splice(s--,1):(i=!1,c<a&&(a=c));if(i){e.splice(m--,1);var l=r();void 0!==l&&(o=l)}}return o}c=c||0;for(var m=e.length;m>0&&e[m-1][2]>c;m--)e[m]=e[m-1];e[m]=[t,r,c]},n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);n.r(c);var a={};o=o||[null,t({}),t([]),t(t)];for(var i=2&r&&e;"object"==typeof i&&!~o.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(o=>a[o]=()=>e[o]);return a.default=()=>e,n.d(c,a),c},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=1623,(()=>{var e={1623:0};n.O.j=o=>0===e[o];var o=(o,t)=>{var r,c,[a,i,s]=t,l=0;if(a.some(o=>0!==e[o])){for(r in i)n.o(i,r)&&(n.m[r]=i[r]);if(s)var m=s(n)}for(o&&o(t);l<a.length;l++)c=a[l],n.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return n.O(m)},t=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var a=n.O(void 0,[94],()=>n(8428));a=n.O(a),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["saved-for-later"]=a})();