|
1
|
|
-import{j as t,b as a}from"./chunks/BlockEditorTranslator.js?ver=1.3.26";import{P as J,a as Q,b as X,c as Y,d as tt}from"./chunks/ProductExcerptBlock.js?ver=1.3.26";import{u as et}from"./chunks/ProductContext.js?ver=1.3.26";import{S as rt}from"./chunks/SingleProductContext.js?ver=1.3.26";import{P as w}from"./chunks/ProductContainerContext.js?ver=1.3.26";import"./chunks/EditorPanel.js?ver=1.3.26";import{E as b}from"./chunks/EditorPanelRow.js?ver=1.3.26";const{InnerBlocks:ot,useBlockProps:P,useInnerBlocksProps:st,__experimentalUseBlockPreview:lt,BlockContextProvider:nt}=wp.blockEditor,ct=lt||null,{useContext:at,useEffect:B,useState:N,useMemo:Yt,memo:it}=wp.element,{useSelect:ut}=wp.data,pt=()=>{const r=st({className:"fct-block-product"},{__unstableDisableLayoutClassNames:!0});return t.jsx("div",{...r})},dt=({blocks:r,blockContextId:e,isHidden:o,setActiveBlockContextId:l})=>{const n=ct({blocks:r,props:{className:"fct-block-product"}}),i=()=>{l(e)},h={display:o?"none":void 0};return t.jsx("div",{...n,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:h})},ft=it(dt),xt=({displayTemplate:r,blocks:e,blockContext:o,setActiveBlockContextId:l})=>t.jsxs(nt,{value:o,children:[r?t.jsx(pt,{}):null,t.jsx(ft,{blocks:e,blockContextId:o.ID,setActiveBlockContextId:l,isHidden:r})]},o.ID),bt={attributes:{wp_client_id:{type:"string",default:""},last_changed:{type:"string",default:""}},edit:r=>{const{attributes:e,setAttributes:o,clientId:l,context:n}=r,{simulateLoading:i,simulateNoResults:h}=at(w);let s=i||h?"hide":"",d=n["fluent-cart/enable_filter"]?"":"not-enable-filter";const g=P({className:"fct-shop-app-preview-wrap "+s+" "+d});B(()=>{o({last_changed:new Date().toISOString()}),!e.wp_client_id&&o({wp_client_id:l})},[l,e.wp_client_id,o]);const k=n["fluent-cart/product_box_grid_size"],u=et(),x=ut(p=>p("core/block-editor").getBlock(l),[l]),[c,f]=N(1);B(()=>{if(c>1){new Date().toISOString();return}f(c+1)},[x]);const _=x.innerBlocks;console.log({blocks:_});const[U,K]=N();return t.jsx("div",{...g,children:t.jsx("div",{className:"shop-app-preview-products gap-5 grid md:grid-cols-dynamic col-dynamic group-[.list]:grid-cols-1 grid-columns-"+k,children:u==null?void 0:u.products.map(p=>{var C;const q=p.ID===(U||((C=u==null?void 0:u.products[0])==null?void 0:C.ID));return t.jsx(rt,{value:{product:p},children:t.jsx("div",{className:"fluent-cart-product-loop fct-product-block-editor-product-card",children:t.jsx(xt,{attributes:{productId:p.ID},blocks:_,displayTemplate:q,blockContext:p,setActiveBlockContextId:K},p.ID)},p.ID)},p.ID)})})})},save:r=>{const e=P.save();return t.jsx("div",{...e,className:"fluent-cart-product-loop fct-product-block-editor-product-card",children:t.jsx(ot.Content,{})})},supports:{align:["wide","full"],html:!1},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"]},{InnerBlocks:I,useBlockProps:$,InspectorControls:ht}=wp.blockEditor,{PanelBody:_t,ToggleControl:y}=wp.components,mt={attributes:{simulate_no_results:{type:"boolean",default:!1},simulate_loading:{type:"boolean",default:!1}},category:"fluent-cart",edit:r=>{const e=$({className:"fluent-cart-product-container"}),{simulate_no_results:o,simulate_loading:l}=r.attributes;return t.jsxs(t.Fragment,{children:[t.jsx(ht,{children:t.jsxs(_t,{title:a("Simulation"),children:[t.jsx(y,{label:a("Simulate No Results"),checked:o,onChange:n=>r.setAttributes({simulate_no_results:n})}),t.jsx(y,{label:a("Simulate Loading"),checked:l,onChange:n=>r.setAttributes({simulate_loading:n})})]})}),t.jsx(w.Provider,{value:{simulateNoResults:o,simulateLoading:l},children:t.jsx("div",{...e,children:t.jsx("div",{className:"shop-app-preview",children:t.jsx(I,{})})})})]})},save:r=>{const e=$.save();return t.jsx("div",{...e,children:t.jsx(I.Content,{})})},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],supports:{align:["wide","full"],html:!1}},{useBlockProps:j,InspectorControls:gt,InnerBlocks:T}=wp.blockEditor,{ToggleControl:m,TextControl:kt}=wp.components,wt={attributes:{filter:{type:"object",default:{}},enable_filter:{type:"boolean",default:!1},live_filter:{type:"boolean",default:!0},enable_wildcard_filter:{type:"boolean",default:!0},enable_wildcard_for_post_content:{type:"boolean",default:!0},default_filter_options:{}},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],edit:r=>{const{attributes:e,setAttributes:o}=r,l=(s,v)=>{let d={...e.filters??{}};d[s]=v,o({filters:{...d}})},n=j({className:"fluent-cart-product-filter-wrapper"}),{context:i}=r,h=i["fluent-cart/enable_filter"];return t.jsxs("div",{...r,...j(),children:[t.jsx(gt,{children:t.jsx("div",{className:"fct-shop-filter-inspector-control-wrap fct-inspector-control-wrap",children:t.jsx("div",{className:"fct-inspector-control-group",children:t.jsxs("div",{className:"fct-inspector-control-body",children:[t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:a("Enable Filter")}),t.jsx("div",{className:"actions",children:t.jsx(m,{checked:e.enable_filter,onChange:s=>{o({enable_filter:s})}})})]}),e.enable_filter&&t.jsxs(t.Fragment,{children:[t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:a("Wildcard Filter")}),t.jsx("div",{className:"actions",children:t.jsx(m,{checked:e.enable_wildcard_filter,onChange:s=>{o({enable_wildcard_filter:s})}})})]}),e.enable_wildcard_filter&&t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:a("Also search in Content")}),t.jsx("div",{className:"actions",children:t.jsx(m,{checked:e.enable_wildcard_for_post_content,onChange:s=>{o({enable_wildcard_for_post_content:s})}})})]}),t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:a("Live Filter")}),t.jsx("div",{className:"actions",children:t.jsx(m,{checked:e.live_filter,onChange:s=>{o({live_filter:s})}})})]}),Object.keys(e.default_filter_options||{}).map((s,v)=>{var g,k,u;let d={};return(g=e.filters)!=null&&g.hasOwnProperty(s)?d=e.filters[s]:(k=e.default_filter_options)!=null&&k.hasOwnProperty(s)&&(d=e.default_filter_options[s]),s!=="enabled"?t.jsxs("div",{className:"mt-5",children:[t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label capitalize",children:s.replace(/[-_]/g," ")}),t.jsx("div",{className:"actions",children:t.jsx(m,{checked:typeof e.filters<"u"&&typeof e.filters[s]<"u"&&((u=e.filters[s])==null?void 0:u.enabled),onChange:x=>{var f,_;let c={};(f=e.filters)!=null&&f.hasOwnProperty(s)?c=e.filters[s]:(_=e.default_filter_options)!=null&&_.hasOwnProperty(s)&&(c=e.default_filter_options[s]),c.enabled=x,c.filter_type=e.default_filter_options[s].filter_type,c.is_meta=e.default_filter_options[s].is_meta,c.multiple=e.default_filter_options[s].multiple,l(s,c)}})})]}),t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:a("Display Name")}),t.jsx("div",{className:"actions",children:t.jsx(kt,{value:d.label,onChange:x=>{var f;let c={};(f=e.filters)!=null&&f.hasOwnProperty(s)?c=e.filters[s]:c.enabled=!0,c.label=x,l(s,c)}})})]})]},s):t.jsx(t.Fragment,{})})]})]})})})}),t.jsx("div",{...n,children:h&&t.jsx(T,{allowedBlocks:["fluent-cart/shopapp-product-filter-search-box","fluent-cart/shopapp-product-filter-button"]})})]})},save:r=>{const e=j.save();return t.jsx("div",{...e,className:"fluent-cart-product-filter-wrapper",children:t.jsx(T.Content,{})})}},{useBlockProps:vt,InspectorControls:te,InnerBlocks:ee}=wp.blockEditor,{ToggleControl:re,TextControl:oe}=wp.components,jt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],edit:r=>{const{attributes:e,setAttributes:o}=r,l=vt({className:"fct-shop-view-switcher"}),{context:n}=r,i=n["fluent-cart/view_mode"];return t.jsxs("div",{...l,children:[t.jsx("button",{type:"button",className:i==="grid"?"active":"",title:a("Grid View"),children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[t.jsx("path",{d:"M12.4059 1.59412C13.3334 2.52162 13.3334 4.0144 13.3334 6.99996C13.3334 9.98552 13.3334 11.4783 12.4059 12.4058C11.4784 13.3333 9.98564 13.3333 7.00008 13.3333C4.01452 13.3333 2.52174 13.3333 1.59424 12.4058C0.666748 11.4783 0.666748 9.98552 0.666748 6.99996C0.666748 4.0144 0.666748 2.52162 1.59424 1.59412C2.52174 0.666626 4.01452 0.666626 7.00008 0.666626C9.98564 0.666626 11.4784 0.666626 12.4059 1.59412Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M13.3335 7L0.66683 7",stroke:"currentColor",strokeLinecap:"round"}),t.jsx("path",{d:"M7 0.666626L7 13.3333",stroke:"currentColor",strokeLinecap:"round"})]})}),t.jsx("button",{type:"button",className:i==="list"?"active":"",title:a("List View"),children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[t.jsx("path",{d:"M1.33325 7.60008C1.33325 6.8279 1.49441 6.66675 2.26659 6.66675H13.7333C14.5054 6.66675 14.6666 6.8279 14.6666 7.60008V8.40008C14.6666 9.17226 14.5054 9.33341 13.7333 9.33341H2.26659C1.49441 9.33341 1.33325 9.17226 1.33325 8.40008V7.60008Z",stroke:"currentColor",strokeLinecap:"round"}),t.jsx("path",{d:"M1.33325 2.26671C1.33325 1.49453 1.49441 1.33337 2.26659 1.33337H13.7333C14.5054 1.33337 14.6666 1.49453 14.6666 2.26671V3.06671C14.6666 3.83889 14.5054 4.00004 13.7333 4.00004H2.26659C1.49441 4.00004 1.33325 3.83888 1.33325 3.06671V2.26671Z",stroke:"currentColor",strokeLinecap:"round"}),t.jsx("path",{d:"M1.33325 12.9333C1.33325 12.1612 1.49441 12 2.26659 12H13.7333C14.5054 12 14.6666 12.1612 14.6666 12.9333V13.7333C14.6666 14.5055 14.5054 14.6667 13.7333 14.6667H2.26659C1.49441 14.6667 1.33325 14.5055 1.33325 13.7333V12.9333Z",stroke:"currentColor",strokeLinecap:"round"})]})})]})},save:r=>null},{useBlockProps:E,InspectorControls:se}=wp.blockEditor,{ToggleControl:le,TextControl:ne}=wp.components,Ct={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r;return t.jsx("div",{...r,...E(),children:t.jsx("div",{className:"fct-product-block-filter-item",children:t.jsxs("div",{className:"relative w-full",children:[t.jsx("div",{className:"absolute top-0 left-[14px] bottom-0 flex items-center text-system-mid",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",children:[t.jsx("path",{d:"M13.125 13.125L16.5 16.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M15 8.25C15 4.52208 11.9779 1.5 8.25 1.5C4.52208 1.5 1.5 4.52208 1.5 8.25C1.5 11.9779 4.52208 15 8.25 15C11.9779 15 15 11.9779 15 8.25Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})]})}),t.jsx("input",{className:"fct-product-block-input",type:"text",name:"wildcard",placeholder:a("Search products by name"),value:""})]})})})},save:r=>(E.save(),null)},{useBlockProps:S,InnerBlocks:L}=wp.blockEditor,Pt={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r;return t.jsx("div",{...r,...S(),children:t.jsx("div",{className:"fct-product-block-filter-item",children:t.jsx(L,{allowedBlocks:["fluent-cart/shopapp-product-filter-apply-button","fluent-cart/shopapp-product-filter-reset-button"]})})})},save:r=>{const e=S.save();return t.jsx("div",{...e,className:"fct-product-block-filter-item",children:t.jsx(L.Content,{})})}},{useBlockProps:F,InspectorControls:ce}=wp.blockEditor,{ToggleControl:ae,TextControl:ie}=wp.components,Bt={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r;return t.jsx("div",{...r,...F(),children:t.jsx("h2",{children:"Product Filters"})})},save:r=>(F.save(),null)},{useContext:ue}=wp.element,{useBlockProps:Nt}=wp.blockEditor,It={usesContext:["fluent-cart/paginator"],edit:r=>{const{context:e}=r;let l=e["fluent-cart/paginator"]==="numbers"?"show":"";const n=Nt({className:"fct-product-paginator-info "+l});return t.jsx("div",{...r,...n,children:a("( Showing 1 to 10 of 34 Items ) 10 Per page")})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useBlockProps:$t}=wp.blockEditor,yt={usesContext:["fluent-cart/paginator"],edit:r=>{const{context:e}=r;let l=e["fluent-cart/paginator"]==="numbers"?"show":"";const n=$t({className:"fct-product-paginator-number-wrap "+l});return t.jsx("div",{...r,...n,children:t.jsxs("ul",{className:"fct-product-paginator-number-items",children:[t.jsx("li",{className:"fct-product-paginator-number-item active",children:"1"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"2"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"3"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"4"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"--"})]})})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useBlockProps:Tt}=wp.blockEditor,Et={edit:r=>{const e=Tt({className:"fct-product-block-filter-button"});return t.jsx("button",{...r,...e,children:"Apply Filter"})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useBlockProps:St}=wp.blockEditor,Lt={edit:r=>{const e=St({className:"fct-product-block-reset-button"});return t.jsx("button",{...r,...e,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M14.2501 9.75V15.75M9.75012 9.75V15.75M20.2498 5.25L3.74976 5.25001M18.7501 5.25V19.5C18.7501 19.6989 18.6711 19.8897 18.5305 20.0303C18.3898 20.171 18.199 20.25 18.0001 20.25H6.00012C5.80121 20.25 5.61044 20.171 5.46979 20.0303C5.32914 19.8897 5.25012 19.6989 5.25012 19.5V5.25M15.7501 5.25V3.75C15.7501 3.35218 15.5921 2.97064 15.3108 2.68934C15.0295 2.40804 14.6479 2.25 14.2501 2.25H9.75012C9.3523 2.25 8.97077 2.40804 8.68946 2.68934C8.40816 2.97064 8.25012 3.35218 8.25012 3.75V5.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useContext:Ft}=wp.element,{useBlockProps:M,InspectorControls:pe,InnerBlocks:A}=wp.blockEditor,{ToggleControl:de,TextControl:fe}=wp.components,Mt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format"],edit:r=>{const{context:e}=r,{simulateNoResults:o}=Ft(w),n=M({className:"fluent-cart-shop-no-result-wrap "+(o?"show":"")});return t.jsx("div",{...n,children:t.jsx(A,{})})},save:r=>{const e=M.save();return t.jsx("div",{...e,className:"fluent-cart-shop-no-result-wrap",children:t.jsx(A.Content,{})})}},{useBlockProps:V,InspectorControls:xe,InnerBlocks:z}=wp.blockEditor,{ToggleControl:be,TextControl:he}=wp.components,At={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r,l=V({className:"fluent-cart-shop-app-view-switcher fluent-cart-product-filter-view-switcher-wrapper"}),{context:n}=r;return t.jsx("div",{...l,children:t.jsx(z,{templateLock:!1,allowedBlocks:["fluent-cart/shopapp-product-view-switcher","fluent-cart/shopapp-product-filter-sort-by"]})})},save:r=>{const e=V.save({className:"fluent-cart-shop-app-view-switcher"});return t.jsx("div",{...e,children:t.jsx(z.Content,{})})}},{useBlockProps:Vt,InspectorControls:_e,InnerBlocks:me}=wp.blockEditor,{ToggleControl:ge,TextControl:ke}=wp.components,zt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],edit:r=>{const{attributes:e,setAttributes:o}=r,l=Vt({className:"fct-shop-filter-sort-by"});return t.jsx("div",{...l,children:a("Sort By")})},save:r=>null},{useContext:Ht}=wp.element,{useBlockProps:H,InnerBlocks:D}=wp.blockEditor,Dt=[["fluent-cart/shopapp-product-spinner"]],Ot={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/enable_filter"],edit:r=>{const{simulateLoading:e}=Ht(w),l=H({className:"fluent-cart-product-loader "+(e?"show":"")});return t.jsx("div",{...l,children:t.jsx(D,{template:Dt})})},save:r=>{const e=H.save();return t.jsx("div",{...e,className:"fluent-cart-product-loader",children:t.jsx(D.Content,{})})}},{useBlockProps:O,InnerBlocks:R}=wp.blockEditor,Rt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/enable_filter"],edit:r=>{const e=O({className:"fluent-cart-product-spinner"});return t.jsx("div",{...e,children:t.jsx(R,{})})},save:r=>{const e=O.save();return t.jsx("div",{...e,className:"fluent-cart-product-spinner",children:t.jsx(R.Content,{})})}},{registerBlockType:G}=wp.blocks,Zt=window.fluent_cart_products_inner_blocks,{InnerBlocks:Z,useBlockProps:W}=wp.blockEditor,Wt={ProductTitleBlock:tt,ProductPriceBlock:Y,ProductImageBlock:X,ProductButtonBlock:Q,ProductExcerptBlock:J,ProductFilterBlock:wt,ProductFilterViewSwitcherBlock:jt,ProductLoopBlock:bt,ProductContainerBlock:mt,ProductFilterSearchBlock:Ct,ProductFilterButtonBlock:Pt,ProductFilterFilters:Bt,ProductPaginatorInfoBlock:It,ProductPaginatorNumberBlock:yt,ProductFilterApplyButtonBlock:Et,ProductFilterResetButtonBlock:Lt,ProductNoResultBlock:Mt,ProductActionContainerBlock:At,ProductFilterSortByBlock:zt,ProductLoaderBlock:Ot,ProductSpinnerBlock:Rt};Zt.blocks.forEach(r=>{const e=Wt[r.component],o=[];r.parent&&o.push(...r.parent),e!=null&&e.parent&&o.push(...e.parent),G(r.slug,{apiVersion:3,category:"product-elements",title:r.title,name:r.slug,icon:r.icon||null,parent:o.length>0?o:null,edit:(e==null?void 0:e.edit)||(()=>a("No edit found")),save:(e==null?void 0:e.save)||(()=>null),supports:(e==null?void 0:e.supports)||{},usesContext:(e==null?void 0:e.usesContext)||[],attributes:(e==null?void 0:e.attributes)||{}})});G("fluent-cart/product-paginator",{apiVersion:3,title:a("Paginator"),icon:"screenoptions",parent:["fluent-cart/products","core/column"],category:"layout",attributes:{},edit:r=>{const e=W({className:"fluent-cart-product-paginator"});return t.jsx("div",{...e,children:t.jsx("div",{children:t.jsx(Z,{allowedBlocks:["fluent-cart/product-paginator-info","fluent-cart/product-paginator-number","core/paragraph"]})})})},save:r=>{const e=W.save();return t.jsx("div",{...e,className:"fluent-cart-product-paginator",children:t.jsx(Z.Content,{})})},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"]}); |
|
1
|
+import{j as t}from"./chunks/jsx-runtime.js?ver=1.6.5";import{P as J,a as Q,b as X,c as Y,d as tt}from"./chunks/ProductExcerptBlock.js?ver=1.6.5";import{u as et}from"./chunks/ProductContext.js?ver=1.6.5";import{S as rt}from"./chunks/SingleProductContext.js?ver=1.6.5";import{P as w}from"./chunks/ProductContainerContext.js?ver=1.6.5";import{b as c}from"./chunks/BlockEditorTranslator.js?ver=1.6.5";import"./chunks/EditorPanel.js?ver=1.6.5";import{E as b}from"./chunks/EditorPanelRow.js?ver=1.6.5";const{InnerBlocks:ot,useBlockProps:P,useInnerBlocksProps:st,__experimentalUseBlockPreview:lt,BlockContextProvider:nt}=wp.blockEditor,ct=lt||null,{useContext:at,useEffect:B,useState:N,useMemo:te,memo:it}=wp.element,{useSelect:ut}=wp.data,pt=()=>{const r=st({className:"fct-block-product"},{__unstableDisableLayoutClassNames:!0});return t.jsx("div",{...r})},dt=({blocks:r,blockContextId:e,isHidden:o,setActiveBlockContextId:l})=>{const n=ct({blocks:r,props:{className:"fct-block-product"}}),i=()=>{l(e)},h={display:o?"none":void 0};return t.jsx("div",{...n,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:h})},ft=it(dt),xt=({displayTemplate:r,blocks:e,blockContext:o,setActiveBlockContextId:l})=>t.jsxs(nt,{value:o,children:[r?t.jsx(pt,{}):null,t.jsx(ft,{blocks:e,blockContextId:o.ID,setActiveBlockContextId:l,isHidden:r})]},o.ID),bt={attributes:{wp_client_id:{type:"string",default:""},last_changed:{type:"string",default:""}},edit:r=>{const{attributes:e,setAttributes:o,clientId:l,context:n}=r,{simulateLoading:i,simulateNoResults:h}=at(w);let s=i||h?"hide":"",d=n["fluent-cart/enable_filter"]?"":"not-enable-filter";const g=P({className:"fct-shop-app-preview-wrap "+s+" "+d});B(()=>{o({last_changed:new Date().toISOString()}),!e.wp_client_id&&o({wp_client_id:l})},[l,e.wp_client_id,o]);const k=n["fluent-cart/product_box_grid_size"],u=et(),x=ut(p=>p("core/block-editor").getBlock(l),[l]),[a,f]=N(1);B(()=>{if(a>1){new Date().toISOString();return}f(a+1)},[x]);const m=x.innerBlocks;console.log({blocks:m});const[U,K]=N();return t.jsx("div",{...g,children:t.jsx("div",{className:"shop-app-preview-products gap-5 grid md:grid-cols-dynamic col-dynamic group-[.list]:grid-cols-1 grid-columns-"+k,children:u==null?void 0:u.products.map(p=>{var C;const q=p.ID===(U||((C=u==null?void 0:u.products[0])==null?void 0:C.ID));return t.jsx(rt,{value:{product:p},children:t.jsx("div",{className:"fluent-cart-product-loop fct-product-block-editor-product-card",children:t.jsx(xt,{attributes:{productId:p.ID},blocks:m,displayTemplate:q,blockContext:p,setActiveBlockContextId:K},p.ID)},p.ID)},p.ID)})})})},save:r=>{const e=P.save();return t.jsx("div",{...e,className:"fluent-cart-product-loop fct-product-block-editor-product-card",children:t.jsx(ot.Content,{})})},supports:{align:["wide","full"],html:!1},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"]},{InnerBlocks:I,useBlockProps:$,InspectorControls:ht}=wp.blockEditor,{PanelBody:mt,ToggleControl:y}=wp.components,_t={attributes:{simulate_no_results:{type:"boolean",default:!1},simulate_loading:{type:"boolean",default:!1}},category:"fluent-cart",edit:r=>{const e=$({className:"fluent-cart-product-container"}),{simulate_no_results:o,simulate_loading:l}=r.attributes;return t.jsxs(t.Fragment,{children:[t.jsx(ht,{children:t.jsxs(mt,{title:c("Simulation"),children:[t.jsx(y,{label:c("Simulate No Results"),checked:o,onChange:n=>r.setAttributes({simulate_no_results:n})}),t.jsx(y,{label:c("Simulate Loading"),checked:l,onChange:n=>r.setAttributes({simulate_loading:n})})]})}),t.jsx(w.Provider,{value:{simulateNoResults:o,simulateLoading:l},children:t.jsx("div",{...e,children:t.jsx("div",{className:"shop-app-preview",children:t.jsx(I,{})})})})]})},save:r=>{const e=$.save();return t.jsx("div",{...e,children:t.jsx(I.Content,{})})},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],supports:{align:["wide","full"],html:!1}},{useBlockProps:j,InspectorControls:gt,InnerBlocks:T}=wp.blockEditor,{ToggleControl:_,TextControl:kt}=wp.components,wt={attributes:{filter:{type:"object",default:{}},enable_filter:{type:"boolean",default:!1},live_filter:{type:"boolean",default:!0},enable_wildcard_filter:{type:"boolean",default:!0},enable_wildcard_for_post_content:{type:"boolean",default:!0},default_filter_options:{}},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],edit:r=>{const{attributes:e,setAttributes:o}=r,l=(s,v)=>{let d={...e.filters??{}};d[s]=v,o({filters:{...d}})},n=j({className:"fluent-cart-product-filter-wrapper"}),{context:i}=r,h=i["fluent-cart/enable_filter"];return t.jsxs("div",{...r,...j(),children:[t.jsx(gt,{children:t.jsx("div",{className:"fct-shop-filter-inspector-control-wrap fct-inspector-control-wrap",children:t.jsx("div",{className:"fct-inspector-control-group",children:t.jsxs("div",{className:"fct-inspector-control-body",children:[t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:c("Enable Filter")}),t.jsx("div",{className:"actions",children:t.jsx(_,{checked:e.enable_filter,onChange:s=>{o({enable_filter:s})}})})]}),e.enable_filter&&t.jsxs(t.Fragment,{children:[t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:c("Wildcard Filter")}),t.jsx("div",{className:"actions",children:t.jsx(_,{checked:e.enable_wildcard_filter,onChange:s=>{o({enable_wildcard_filter:s})}})})]}),e.enable_wildcard_filter&&t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:c("Also search in Content")}),t.jsx("div",{className:"actions",children:t.jsx(_,{checked:e.enable_wildcard_for_post_content,onChange:s=>{o({enable_wildcard_for_post_content:s})}})})]}),t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:c("Live Filter")}),t.jsx("div",{className:"actions",children:t.jsx(_,{checked:e.live_filter,onChange:s=>{o({live_filter:s})}})})]}),Object.keys(e.default_filter_options||{}).map((s,v)=>{var g,k,u;let d={};return(g=e.filters)!=null&&g.hasOwnProperty(s)?d=e.filters[s]:(k=e.default_filter_options)!=null&&k.hasOwnProperty(s)&&(d=e.default_filter_options[s]),s!=="enabled"?t.jsxs("div",{className:"mt-5",children:[t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label capitalize",children:s.replace(/[-_]/g," ")}),t.jsx("div",{className:"actions",children:t.jsx(_,{checked:typeof e.filters<"u"&&typeof e.filters[s]<"u"&&((u=e.filters[s])==null?void 0:u.enabled),onChange:x=>{var f,m;let a={};(f=e.filters)!=null&&f.hasOwnProperty(s)?a=e.filters[s]:(m=e.default_filter_options)!=null&&m.hasOwnProperty(s)&&(a=e.default_filter_options[s]),a.enabled=x,a.filter_type=e.default_filter_options[s].filter_type,a.is_meta=e.default_filter_options[s].is_meta,a.multiple=e.default_filter_options[s].multiple,l(s,a)}})})]}),t.jsxs(b,{children:[t.jsx("span",{className:"fct-inspector-control-label",children:c("Display Name")}),t.jsx("div",{className:"actions",children:t.jsx(kt,{value:d.label,onChange:x=>{var f;let a={};(f=e.filters)!=null&&f.hasOwnProperty(s)?a=e.filters[s]:a.enabled=!0,a.label=x,l(s,a)}})})]})]},s):t.jsx(t.Fragment,{})})]})]})})})}),t.jsx("div",{...n,children:h&&t.jsx(T,{allowedBlocks:["fluent-cart/shopapp-product-filter-search-box","fluent-cart/shopapp-product-filter-button"]})})]})},save:r=>{const e=j.save();return t.jsx("div",{...e,className:"fluent-cart-product-filter-wrapper",children:t.jsx(T.Content,{})})}},{useBlockProps:vt,InspectorControls:ee,InnerBlocks:re}=wp.blockEditor,{ToggleControl:oe,TextControl:se}=wp.components,jt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],edit:r=>{const{attributes:e,setAttributes:o}=r,l=vt({className:"fct-shop-view-switcher"}),{context:n}=r,i=n["fluent-cart/view_mode"];return t.jsxs("div",{...l,children:[t.jsx("button",{type:"button",className:i==="grid"?"active":"",title:c("Grid View"),children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[t.jsx("path",{d:"M12.4059 1.59412C13.3334 2.52162 13.3334 4.0144 13.3334 6.99996C13.3334 9.98552 13.3334 11.4783 12.4059 12.4058C11.4784 13.3333 9.98564 13.3333 7.00008 13.3333C4.01452 13.3333 2.52174 13.3333 1.59424 12.4058C0.666748 11.4783 0.666748 9.98552 0.666748 6.99996C0.666748 4.0144 0.666748 2.52162 1.59424 1.59412C2.52174 0.666626 4.01452 0.666626 7.00008 0.666626C9.98564 0.666626 11.4784 0.666626 12.4059 1.59412Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M13.3335 7L0.66683 7",stroke:"currentColor",strokeLinecap:"round"}),t.jsx("path",{d:"M7 0.666626L7 13.3333",stroke:"currentColor",strokeLinecap:"round"})]})}),t.jsx("button",{type:"button",className:i==="list"?"active":"",title:c("List View"),children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[t.jsx("path",{d:"M1.33325 7.60008C1.33325 6.8279 1.49441 6.66675 2.26659 6.66675H13.7333C14.5054 6.66675 14.6666 6.8279 14.6666 7.60008V8.40008C14.6666 9.17226 14.5054 9.33341 13.7333 9.33341H2.26659C1.49441 9.33341 1.33325 9.17226 1.33325 8.40008V7.60008Z",stroke:"currentColor",strokeLinecap:"round"}),t.jsx("path",{d:"M1.33325 2.26671C1.33325 1.49453 1.49441 1.33337 2.26659 1.33337H13.7333C14.5054 1.33337 14.6666 1.49453 14.6666 2.26671V3.06671C14.6666 3.83889 14.5054 4.00004 13.7333 4.00004H2.26659C1.49441 4.00004 1.33325 3.83888 1.33325 3.06671V2.26671Z",stroke:"currentColor",strokeLinecap:"round"}),t.jsx("path",{d:"M1.33325 12.9333C1.33325 12.1612 1.49441 12 2.26659 12H13.7333C14.5054 12 14.6666 12.1612 14.6666 12.9333V13.7333C14.6666 14.5055 14.5054 14.6667 13.7333 14.6667H2.26659C1.49441 14.6667 1.33325 14.5055 1.33325 13.7333V12.9333Z",stroke:"currentColor",strokeLinecap:"round"})]})})]})},save:r=>null},{useBlockProps:E,InspectorControls:le}=wp.blockEditor,{ToggleControl:ne,TextControl:ce}=wp.components,Ct={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r;return t.jsx("div",{...r,...E(),children:t.jsx("div",{className:"fct-product-block-filter-item",children:t.jsxs("div",{className:"relative w-full",children:[t.jsx("div",{className:"absolute top-0 left-[14px] bottom-0 flex items-center text-system-mid",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",children:[t.jsx("path",{d:"M13.125 13.125L16.5 16.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M15 8.25C15 4.52208 11.9779 1.5 8.25 1.5C4.52208 1.5 1.5 4.52208 1.5 8.25C1.5 11.9779 4.52208 15 8.25 15C11.9779 15 15 11.9779 15 8.25Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})]})}),t.jsx("input",{className:"fct-product-block-input",type:"text",name:"wildcard",placeholder:c("Search products by name"),value:""})]})})})},save:r=>(E.save(),null)},{useBlockProps:S,InnerBlocks:L}=wp.blockEditor,Pt={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r;return t.jsx("div",{...r,...S(),children:t.jsx("div",{className:"fct-product-block-filter-item",children:t.jsx(L,{allowedBlocks:["fluent-cart/shopapp-product-filter-apply-button","fluent-cart/shopapp-product-filter-reset-button"]})})})},save:r=>{const e=S.save();return t.jsx("div",{...e,className:"fct-product-block-filter-item",children:t.jsx(L.Content,{})})}},{useBlockProps:F,InspectorControls:ae}=wp.blockEditor,{ToggleControl:ie,TextControl:ue}=wp.components,Bt={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r;return t.jsx("div",{...r,...F(),children:t.jsx("h2",{children:c("Product Filters")})})},save:r=>(F.save(),null)},{useContext:pe}=wp.element,{useBlockProps:Nt}=wp.blockEditor,It={usesContext:["fluent-cart/paginator"],edit:r=>{const{context:e}=r;let l=e["fluent-cart/paginator"]==="numbers"?"show":"";const n=Nt({className:"fct-product-paginator-info "+l});return t.jsx("div",{...r,...n,children:c("( Showing 1 to 10 of 34 Items ) 10 Per page")})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useBlockProps:$t}=wp.blockEditor,yt={usesContext:["fluent-cart/paginator"],edit:r=>{const{context:e}=r;let l=e["fluent-cart/paginator"]==="numbers"?"show":"";const n=$t({className:"fct-product-paginator-number-wrap "+l});return t.jsx("div",{...r,...n,children:t.jsxs("ul",{className:"fct-product-paginator-number-items",children:[t.jsx("li",{className:"fct-product-paginator-number-item active",children:"1"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"2"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"3"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"4"}),t.jsx("li",{className:"fct-product-paginator-number-item",children:"--"})]})})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useBlockProps:Tt}=wp.blockEditor,Et={edit:r=>{const e=Tt({className:"fct-product-block-filter-button"});return t.jsx("button",{...r,...e,children:c("Apply Filter")})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useBlockProps:St}=wp.blockEditor,Lt={edit:r=>{const e=St({className:"fct-product-block-reset-button"});return t.jsx("button",{...r,...e,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M14.2501 9.75V15.75M9.75012 9.75V15.75M20.2498 5.25L3.74976 5.25001M18.7501 5.25V19.5C18.7501 19.6989 18.6711 19.8897 18.5305 20.0303C18.3898 20.171 18.199 20.25 18.0001 20.25H6.00012C5.80121 20.25 5.61044 20.171 5.46979 20.0303C5.32914 19.8897 5.25012 19.6989 5.25012 19.5V5.25M15.7501 5.25V3.75C15.7501 3.35218 15.5921 2.97064 15.3108 2.68934C15.0295 2.40804 14.6479 2.25 14.2501 2.25H9.75012C9.3523 2.25 8.97077 2.40804 8.68946 2.68934C8.40816 2.97064 8.25012 3.35218 8.25012 3.75V5.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})},save:r=>null,supports:{html:!1,align:["left","center","right"],typography:{fontSize:!0,lineHeight:!0},spacing:{margin:!0},color:{text:!0}}},{useContext:Ft}=wp.element,{useBlockProps:M,InspectorControls:de,InnerBlocks:A}=wp.blockEditor,{ToggleControl:fe,TextControl:xe}=wp.components,Mt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format"],edit:r=>{const{context:e}=r,{simulateNoResults:o}=Ft(w),n=M({className:"fluent-cart-shop-no-result-wrap "+(o?"show":"")});return t.jsx("div",{...n,children:t.jsx(A,{})})},save:r=>{const e=M.save();return t.jsx("div",{...e,className:"fluent-cart-shop-no-result-wrap",children:t.jsx(A.Content,{})})}},{useBlockProps:V,InspectorControls:be,InnerBlocks:z}=wp.blockEditor,{ToggleControl:he,TextControl:me}=wp.components,At={attributes:{},edit:r=>{const{attributes:e,setAttributes:o}=r,l=V({className:"fluent-cart-shop-app-view-switcher fluent-cart-product-filter-view-switcher-wrapper"}),{context:n}=r;return t.jsx("div",{...l,children:t.jsx(z,{templateLock:!1,allowedBlocks:["fluent-cart/shopapp-product-view-switcher","fluent-cart/shopapp-product-filter-sort-by"]})})},save:r=>{const e=V.save({className:"fluent-cart-shop-app-view-switcher"});return t.jsx("div",{...e,children:t.jsx(z.Content,{})})}},{useBlockProps:Vt,InspectorControls:_e,InnerBlocks:ge}=wp.blockEditor,{ToggleControl:ke,TextControl:we}=wp.components,zt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"],edit:r=>{const{attributes:e,setAttributes:o}=r,l=Vt({className:"fct-shop-filter-sort-by"});return t.jsx("div",{...l,children:c("Sort By")})},save:r=>null},{useContext:Ht}=wp.element,{useBlockProps:H,InnerBlocks:D}=wp.blockEditor,Dt=[["fluent-cart/shopapp-product-spinner"]],Ot={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/enable_filter"],edit:r=>{const{simulateLoading:e}=Ht(w),l=H({className:"fluent-cart-product-loader "+(e?"show":"")});return t.jsx("div",{...l,children:t.jsx(D,{template:Dt})})},save:r=>{const e=H.save();return t.jsx("div",{...e,className:"fluent-cart-product-loader",children:t.jsx(D.Content,{})})}},{useBlockProps:O,InnerBlocks:R}=wp.blockEditor,Rt={attributes:{},usesContext:["fluent-cart/paginator","fluent-cart/enable_filter"],edit:r=>{const e=O({className:"fluent-cart-product-spinner"});return t.jsx("div",{...e,children:t.jsx(R,{})})},save:r=>{const e=O.save();return t.jsx("div",{...e,className:"fluent-cart-product-spinner",children:t.jsx(R.Content,{})})}},{registerBlockType:G}=wp.blocks,Zt=window.fluent_cart_products_inner_blocks,{InnerBlocks:Z,useBlockProps:W}=wp.blockEditor,Wt={ProductTitleBlock:tt,ProductPriceBlock:Y,ProductImageBlock:X,ProductButtonBlock:Q,ProductExcerptBlock:J,ProductFilterBlock:wt,ProductFilterViewSwitcherBlock:jt,ProductLoopBlock:bt,ProductContainerBlock:_t,ProductFilterSearchBlock:Ct,ProductFilterButtonBlock:Pt,ProductFilterFilters:Bt,ProductPaginatorInfoBlock:It,ProductPaginatorNumberBlock:yt,ProductFilterApplyButtonBlock:Et,ProductFilterResetButtonBlock:Lt,ProductNoResultBlock:Mt,ProductActionContainerBlock:At,ProductFilterSortByBlock:zt,ProductLoaderBlock:Ot,ProductSpinnerBlock:Rt};Zt.blocks.forEach(r=>{const e=Wt[r.component],o=[];r.parent&&o.push(...r.parent),e!=null&&e.parent&&o.push(...e.parent),G(r.slug,{apiVersion:3,category:"product-elements",title:r.title,name:r.slug,icon:r.icon||null,parent:o.length>0?o:null,edit:(e==null?void 0:e.edit)||(()=>c("No edit found")),save:(e==null?void 0:e.save)||(()=>null),supports:(e==null?void 0:e.supports)||{},usesContext:(e==null?void 0:e.usesContext)||[],attributes:(e==null?void 0:e.attributes)||{}})});G("fluent-cart/product-paginator",{apiVersion:3,title:c("Paginator"),icon:"screenoptions",parent:["fluent-cart/products","core/column"],category:"layout",attributes:{},edit:r=>{const e=W({className:"fluent-cart-product-paginator"});return t.jsx("div",{...e,children:t.jsx("div",{children:t.jsx(Z,{allowedBlocks:["fluent-cart/product-paginator-info","fluent-cart/product-paginator-number","core/paragraph"]})})})},save:r=>{const e=W.save();return t.jsx("div",{...e,className:"fluent-cart-product-paginator",children:t.jsx(Z.Content,{})})},usesContext:["fluent-cart/paginator","fluent-cart/per_page","fluent-cart/enable_filter","fluent-cart/product_box_grid_size","fluent-cart/view_mode","fluent-cart/filters","fluent-cart/default_filters","fluent-cart/order_type","fluent-cart/order_by","fluent-cart/live_filter","fluent-cart/price_format","fluent-cart/enable_wildcard_filter"]}); |