import{getContext as o,store as n}from"@wordpress/interactivity";n("gateway/click-control",{actions:{preventDefault:o=>{o.preventDefault()},handleLinkClick:t=>{t.preventDefault();const a=o(),{action:c,namespace:e}=a;if(c&&e)try{const[o,a]=c.split(".");if(!o||!a)return void console.warn('GT Click Control: Invalid action format. Use "actions.methodName" or "callbacks.methodName"');const{actions:l,callbacks:i}=n(e);"actions"===o&&l&&l[a]?l[a](t):"callbacks"===o&&i&&i[a]?i[a](t):console.warn(`GT Click Control: Action "${c}" not found in namespace "${e}"`)}catch(o){console.error("GT Click Control: Error calling action",o)}else console.warn("GT Click Control: No action or namespace specified")}}});