using UnityEngine;

namespace RetroDev.OS
{
    public class OSExample : MonoBehaviour
    {
        void Start()
        {
            // Get device model
            string deviceModel = OS.GetDeviceModel();
            Debug.Log("Device Model: " + deviceModel);

            // Get device type
            string deviceType = OS.GetDeviceType();
            Debug.Log("Device Type: " + deviceType);

            // Get operating system
            string operatingSystem = OS.GetOperatingSystem();
            Debug.Log("Operating System: " + operatingSystem);

            // Get battery level
            float batteryLevel = OS.GetBatteryLevel();
            Debug.Log("Battery Level: " + (batteryLevel * 100) + "%");

            // Get graphics device name
            string graphicsDeviceName = OS.GetGraphicsDeviceName();
            Debug.Log("Graphics Device Name: " + graphicsDeviceName);

            // Get system memory size
            int systemMemorySize = OS.GetSystemMemorySize();
            Debug.Log("System Memory Size: " + systemMemorySize + " MB");

            // Get screen width
            int screenWidth = OS.GetScreenWidth();
            Debug.Log("Screen Width: " + screenWidth);

            // Get screen height
            int screenHeight = OS.GetScreenHeight();
            Debug.Log("Screen Height: " + screenHeight);

            // Check for touch input support
            bool isTouchSupported = OS.IsTouchSupported();
            Debug.Log("Touch Supported: " + isTouchSupported);

            // Check for accelerometer support
            bool hasAccelerometer = OS.HasAccelerometer();
            Debug.Log("Accelerometer Supported: " + hasAccelerometer);

            // Check for gyroscope support
            bool hasGyroscope = OS.HasGyroscope();
            Debug.Log("Gyroscope Supported: " + hasGyroscope);

            // Check if location services are available
            bool hasLocationService = OS.HasLocationService();
            Debug.Log("Location Service Supported: " + hasLocationService);

            // Get device language
            string deviceLanguage = OS.GetDeviceLanguage();
            Debug.Log("Device Language: " + deviceLanguage);

            // Check network reachability
            NetworkReachability networkReachability = OS.GetNetworkReachability();
            Debug.Log("Network Reachability: " + networkReachability);

            // Get device UDID
            string deviceUDID = OS.GetDeviceUDID();
            Debug.Log("Device UDID: " + deviceUDID);

            // Get processor type
            string processorType = OS.GetProcessorType();
            Debug.Log("Processor Type: " + processorType);

            // Get processor cores
            int processorCount = OS.GetProcessorCount();
            Debug.Log("Processor Cores: " + processorCount);

            // Get the processor frequency
            int processorFrequency = OS.GetProcessorFrequency();
            Debug.Log("Processor Frequency: " + processorFrequency);
        }
    }
}
