this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["customer-account"]=function(e){function t(t){for(var c,l,a=t[0],i=t[1],s=t[2],b=0,p=[];b{let{iconStyle:t,displayStyle:o,iconClass:n}=e;const l=t===_.ALT?m:w;return o===O.TEXT_ONLY?null:Object(c.createElement)(r.a,{className:n,icon:l,size:18})},C=e=>{let{displayStyle:t}=e;if(t===O.ICON_ONLY)return null;const o=Object(g.getSetting)("currentUserId",null);return Object(c.createElement)("span",{className:"label"},o?Object(i.__)("My Account","woocommerce"):Object(i.__)("Log in","woocommerce"))};var f=e=>{let{attributes:t}=e;const{displayStyle:o,iconStyle:n,iconClass:r}=t;return Object(c.createElement)("a",{href:Object(g.getSetting)("dashboardUrl",Object(g.getSetting)("wpLoginUrl","/wp-login.php"))},Object(c.createElement)(y,{iconStyle:n,displayStyle:o,iconClass:r}),Object(c.createElement)(C,{displayStyle:o}))};const j=()=>{const e=Object(g.getSetting)("adminUrl")+"admin.php?page=wc-settings&tab=account",t=Object(c.createInterpolateElement)(`${Object(i.__)("Manage account settings","woocommerce")}`,{a:Object(c.createElement)(d.ExternalLink,{href:e})});return Object(c.createElement)("div",{className:"wc-block-editor-customer-account__link"},t)},h=e=>{let{attributes:t,setAttributes:o}=e;const{displayStyle:n,iconStyle:l}=t,a=[O.ICON_ONLY,O.ICON_AND_TEXT].includes(n);return Object(c.createElement)(p.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,null,Object(c.createElement)(j,null)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Display settings","woocommerce")},Object(c.createElement)(d.SelectControl,{className:"customer-account-display-style",label:Object(i.__)("Icon options","woocommerce"),value:n,onChange:e=>{o({displayStyle:e})},help:Object(i.__)("Choose if you want to include an icon with the customer account link.","woocommerce"),options:[{value:O.ICON_AND_TEXT,label:Object(i.__)("Icon and text","woocommerce")},{value:O.TEXT_ONLY,label:Object(i.__)("Text-only","woocommerce")},{value:O.ICON_ONLY,label:Object(i.__)("Icon-only","woocommerce")}]}),a?Object(c.createElement)(d.__experimentalToggleGroupControl,{label:Object(i.__)("Display Style","woocommerce"),value:l,onChange:e=>o({iconStyle:e}),className:"wc-block-editor-customer-account__icon-style-toggle"},Object(c.createElement)(d.__experimentalToggleGroupControlOption,{value:_.DEFAULT,label:Object(c.createElement)(r.a,{icon:w,size:16,className:b()("wc-block-editor-customer-account__icon-option",{active:l===_.DEFAULT})})}),Object(c.createElement)(d.__experimentalToggleGroupControlOption,{value:_.ALT,label:Object(c.createElement)(r.a,{icon:m,size:20,className:b()("wc-block-editor-customer-account__icon-option",{active:l===_.ALT})})})):null))};o(479);o(478),Object(n.registerBlockType)(s,{icon:{src:Object(c.createElement)(r.a,{icon:a,className:"wc-block-editor-components-block-icon"})},attributes:{...s.attributes},edit:e=>{let{attributes:t,setAttributes:o}=e;const{className:n}=t,r=Object(p.useBlockProps)({className:b()("wc-block-editor-customer-account",n)});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",r,Object(c.createElement)(p.InspectorControls,null,Object(c.createElement)(h,{attributes:t,setAttributes:o})),Object(c.createElement)(d.Disabled,null,Object(c.createElement)(f,{attributes:t}))))},save:()=>null}),Object(n.registerBlockVariation)("woocommerce/customer-account",{name:"woocommerce/customer-account",title:Object(i.__)("Customer account","woocommerce"),isDefault:!0,attributes:{...s.attributes,displayStyle:"icon_and_text",iconStyle:"default",iconClass:"wc-block-customer-account__account-icon"}})},8:function(e,t){e.exports=window.wp.blocks}});