console.log("Job Agent Web App Bridge Loaded"),window.addEventListener("JOB_AGENT_SEND_TO_JOBROOM",(function(e){console.log("Bridge received JOB_AGENT_SEND_TO_JOBROOM event",e.detail),chrome.runtime.sendMessage({type:"SEND_JOB_TO_JOBROOM",data:e.detail},(function(e){console.log("Bridge received response from background:",e),chrome.runtime.lastError?(console.error("Bridge error:",chrome.runtime.lastError),alert("Error sending to extension: "+chrome.runtime.lastError.message)):e&&e.success?console.log("Job sent to Job-Room successfully."):alert("Failed to send to Job-Room: "+((null==e?void 0:e.error)||"Unknown error"))}))})),window.addEventListener("JOB_AGENT_SCRAPE_URL",(function(e){console.log("Bridge received JOB_AGENT_SCRAPE_URL event",e.detail);var o=e.detail.url;chrome.runtime.sendMessage({type:"SCRAPE_URL_IN_BACKGROUND",url:o},(function(e){console.log("Bridge received scrape response:",e);var o=new CustomEvent("JOB_AGENT_SCRAPE_RESULT",{detail:e});window.dispatchEvent(o)}))}));
//# sourceMappingURL=web-app-bridge.js.map