(()=>{"use strict";var e={};(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);const t=window.wp.hooks,o=window.wp.i18n,a=window.wp.element,n=window.qlwapp["admin-menu"],c=window.wp.data,r="qlwapp/menu/store",l=()=>{const{setSettingsWoocommerce:e,settingsWoocommerce:t,saveWoocommerceSettings:l}=function(){const{setSettingsWoocommerce:e,saveWoocommerceSettings:t}=(0,c.useDispatch)(r),{settingsWoocommerce:o,isResolvingSettingsWoocommerce:a,hasResolvedSettingsWoocommerce:n}=(0,c.useSelect)((e=>{const{getSettingsWoocommerce:t,isResolving:o,hasFinishedResolution:a}=e(r);return{settingsWoocommerce:t(),isResolvingSettingsWoocommerce:o("getSettingsWoocommerce"),hasResolvedSettingsWoocommerce:a("getSettingsWoocommerce")}}),[]);return{settingsWoocommerce:o,isResolvingSettingsWoocommerce:a,hasResolvedSettingsWoocommerce:n,hasSettingsWoocommerce:!(!n||!Object.keys(o)?.length),saveWoocommerceSettings:t,setSettingsWoocommerce:e}}(),m=t=>{const{name:o,value:a}=t.target;e({[o]:a})},s=[{value:"none",label:(0,o.__)("None","wp-whatsapp-chat")},{value:"woocommerce_before_add_to_cart_form",label:(0,o.__)('Before "Add To Cart" form',"wp-whatsapp-chat")},{value:"woocommerce_before_add_to_cart_button",label:(0,o.__)('Before "Add To Cart" button',"wp-whatsapp-chat")},{value:"woocommerce_after_add_to_cart_button",label:(0,o.__)('After "Add To Cart" button',"wp-whatsapp-chat")},{value:"woocommerce_after_add_to_cart_form",label:(0,o.__)('After "Add To Cart" form',"wp-whatsapp-chat")},{value:"woocommerce_product_additional_information",label:(0,o.__)('After "Additional information"',"wp-whatsapp-chat")}];return(0,a.createElement)(n.Tab,{settings:t,onSubmit:async()=>await l(t)},(0,a.createElement)("table",{className:"form-table"},(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("th",{scope:"row"},(0,o.__)("Position","wp-whatsapp-chat")),(0,a.createElement)("td",null,(0,a.createElement)("select",{name:"position",value:t.position,onChange:m},s.map((e=>(0,a.createElement)("option",{key:e.value,value:e.value},e.label)))))),(0,a.createElement)("tr",null,(0,a.createElement)("th",{scope:"row"},(0,o.__)("Position Priority","wp-whatsapp-chat")),(0,a.createElement)("td",null,(0,a.createElement)("input",{type:"number",step:"5",min:"-100",max:"100",name:"position_priority",placeholder:t.position_priority,value:t.position_priority,onChange:m}),(0,a.createElement)("p",{className:"description"},(0,o.__)("Position priority","wp-whatsapp-chat")))))),(0,a.createElement)("hr",null),(0,a.createElement)(n.Button,{settings:t,onChange:m}))},m=[{label:(0,o.__)("WooCommerce","wp-whatsapp-chat"),name:"woocommerce",content:()=>{const{Fill:e}=(0,n.useAppSlotContext)();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e.Header,null,(0,a.createElement)(n.Header,null)),(0,a.createElement)(e.Navigation,null,(0,a.createElement)(n.Nav,null)),(0,a.createElement)(e.Content,null,(0,a.createElement)(l,null)))}}];(0,t.addFilter)("wp-whatsapp-chat.app.tabs","wp-whatsapp-chat/app/tabs/woocommerce",(function(e){return e.splice(e.length-1,0,m[0]),e}),10,1),(window.qlwapp=window.qlwapp||{})["admin-menu-woocommerce"]=e})();