!function(){"use strict";var e,t={7005:function(e,t,r){var o=r(1609),l=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,s={},i=null,u=null;for(o in void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(s[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===s[o]&&(s[o]=t[o]);return{$$typeof:l,type:e,key:i,ref:u,props:s,_owner:n.current}}},9255:function(e,t,r){e.exports=r(7005)},5003:function(e,t,r){var o=window.wp.blocks,l=window.wp.primitives,a=r(9255),n=(0,a.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(l.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),c=window.wp.i18n,s=window.wp.blockEditor,i=window.wp.element,u=window.wp.components,p=(window.wp.data,window.wp.coreData,window.wp.htmlEntities,window.wp.compose);function _(e){let{attributes:t,setAttributes:r}=e;const{placeholder:o,help_text:l}=t,a=(0,p.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return React.createElement(u.__experimentalToolsPanel,{label:(0,c.__)("Labels","surecart"),resetAll:()=>r({placeholder:"",help_text:""}),dropdownMenuProps:a},React.createElement(u.__experimentalToolsPanelItem,{label:(0,c.__)("Placeholder","surecart"),hasValue:()=>!!o,onDeselect:()=>r({placeholder:""})},React.createElement(u.TextControl,{label:(0,c.__)("Placeholder","surecart"),value:o,onChange:e=>r({placeholder:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),React.createElement(u.__experimentalToolsPanelItem,{label:(0,c.__)("Help Text","surecart"),hasValue:()=>!!l,onDeselect:()=>r({help_text:""})},React.createElement(u.TextControl,{label:(0,c.__)("Help Text","surecart"),value:l,onChange:e=>r({help_text:e}),help:(0,c.__)("Optional text that appears below the note field to provide additional guidance.","surecart"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})))}var d=JSON.parse('{"UU":"surecart/product-line-item-note"}');(0,o.registerBlockType)(d.UU,{icon:n,edit:e=>{let{attributes:t,setAttributes:r}=e;const{label:o,placeholder:l,help_text:a}=t,[n,u]=(0,i.useState)(1),{style:p}=(0,s.__experimentalUseBorderProps)(t),{style:d}=(0,s.__experimentalUseColorProps)(t),f=(0,s.useBlockProps)({style:{display:"block",...d?.color?{"--sc-input-label-color":d.color,"--sc-focus-ring-color-primary":d.color,"--sc-input-border-color-focus":d.color}:{}}});return React.createElement(React.Fragment,null,React.createElement(s.InspectorControls,null,React.createElement(_,{attributes:t,setAttributes:r})),React.createElement("div",f,React.createElement(s.RichText,{tagName:"label",className:`sc-form-label ${d.className}`,"aria-label":(0,c.__)("Label text","surecart"),placeholder:(0,c.__)("Add label…","surecart"),value:o||(0,c.__)("Note","surecart"),onChange:e=>r({label:e}),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),React.createElement("textarea",{className:"sc-form-control",placeholder:l||(0,c.__)("Add a note (optional)","surecart"),rows:n,onFocus:()=>u(3),style:{...p?.borderRadius?{"border-radius":p.borderRadius}:{}}}),a&&React.createElement("div",{className:"sc-help-text"},a)))}})},1609:function(e){e.exports=window.React}},r={};function o(e){var l=r[e];if(void 0!==l)return l.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=function(t,r,l,a){if(!r){var n=1/0;for(u=0;u<e.length;u++){r=e[u][0],l=e[u][1],a=e[u][2];for(var c=!0,s=0;s<r.length;s++)(!1&a||n>=a)&&Object.keys(o.O).every((function(e){return o.O[e](r[s])}))?r.splice(s--,1):(c=!1,a<n&&(n=a));if(c){e.splice(u--,1);var i=l();void 0!==i&&(t=i)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,l,a]},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={1420:0,4244:0};o.O.j=function(t){return 0===e[t]};var t=function(t,r){var l,a,n=r[0],c=r[1],s=r[2],i=0;if(n.some((function(t){return 0!==e[t]}))){for(l in c)o.o(c,l)&&(o.m[l]=c[l]);if(s)var u=s(o)}for(t&&t(r);i<n.length;i++)a=n[i],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(u)},r=self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var l=o.O(void 0,[4244],(function(){return o(5003)}));l=o.O(l)}();