package com.github.nullptroma.wallenc.ui.screens.main.screens.storage

import androidx.lifecycle.SavedStateHandle
import java.util.UUID

internal fun SavedStateHandle.requireStorageUuid(): UUID {
    val raw = get<String>("storageUuid") ?: error("Missing storage UUID in navigation arguments")
    return UUID.fromString(raw)
}

internal fun SavedStateHandle.optionalSecretId(): String? = get<String>("secretId")
