# RescuePC Protected Module - DO NOT EDIT
# Source code is maintained separately in the development repository.

function Get-RescuePCLicenseState {
    $path = "$env:ProgramData\RescuePC\license_state.json"
    if (-not (Test-Path $path)) {
        return $null
    }

    try {
        $json = Get-Content $path -Raw | ConvertFrom-Json
        return $json
    } catch {
        return $null
    }
}

function Test-RescuePCOwner {
    $license = Get-RescuePCLicenseState
    return ($license -and $license.role -eq 'OWNER')
}

Export-ModuleMember -Function Get-RescuePCLicenseState, Test-RescuePCOwner