import { fw } from 'rage-fw-client'

fw.browser.registerBrowser(mp.browsers.new('package://cef/index.html'))

fw.event.register('customClientEvent', async ([greetings]) => {
    fw.system.log.info(greetings)

    const data = await fw.player.triggerBrowser('customCefEvent', ['str'])
    fw.system.log.info(`CEF RESPONSE: ${data}`)

    return 'Hola from client!'
})
