import type { BehaviorModule } from '../../../index.mjs'
import '../plain.js'

type LocationType = 'known location' | 'unknown location'

export default {
    behaviorModuleUrl: import.meta.url,
    behavior: () => {
        let msg: LocationType
        if (window.location.href.startsWith('/test')) {
            msg = 'known location'
        } else {
            msg = 'unknown location'
        }

        alert(msg)
    },
    functions: {
        funcA: () => {
            alert('func a')
        },
        funcB: () => {
            alert('func b')
        }
    },
} satisfies BehaviorModule
