import { getCotSslPaths, getCotPort } from '../../utils/cotSsl.js'

/** Public CoT server config for QR code / client setup (port and whether TLS is used). */
export default defineEventHandler(() => {
  const config = useRuntimeConfig()
  const paths = getCotSslPaths(config)
  return { port: getCotPort(), ssl: Boolean(paths) }
})
