package cl.homelogic.platform.designsystem.themes

import cl.homelogic.platform.common.logging.Trace
import cl.homelogic.platform.common.logging.TreeRoots
import platform.UIKit.UIApplication
import platform.UIKit.UIStatusBarStyleDarkContent
import platform.UIKit.UIStatusBarStyleLightContent
import platform.UIKit.setStatusBarStyle

@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
actual class StatusBarManager : IStatusBarManager {
    override fun lightMode() {
        Trace.d(TreeRoots.DesignSystem, "iOS - requesting light status bar")
        UIApplication.sharedApplication.setStatusBarStyle(
            UIStatusBarStyleLightContent,
            animated = true,
        )
    }

    override fun darkMode() {
        Trace.d(TreeRoots.DesignSystem, "iOS - requesting dark status bar")
        UIApplication.sharedApplication.setStatusBarStyle(
            UIStatusBarStyleDarkContent,
            animated = true,
        )
    }
}
