package com.nate.posedetection

import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import platform.Foundation.NSLog
import platform.posix.exit

private object IosExperimentAutoBridge : ExperimentAutoBridge {
    override fun log(msg: String) {
        NSLog("[ExperimentAuto] %s", msg)
    }

    override fun finishActivity() {
        NSLog("[ExperimentAuto] finishActivity — exiting")
        exit(0)
    }
}

@Composable
actual fun rememberExperimentAutoBridge(): ExperimentAutoBridge =
    remember { IosExperimentAutoBridge }
