//
//  Environment.swift
//  kordophone2
//
//  Created by James Magahern on 8/29/25.
//

import SwiftUI

extension EnvironmentValues
{
    @Entry var xpcClient: XPCClient = XPCClient()
    @Entry var selectedConversation: Display.Conversation? = nil
}

extension View
{
    func xpcClient(_ client: XPCClient) -> some View {
        environment(\.xpcClient, client)
    }
    
    func selectedConversation(_ convo: Display.Conversation?) -> some View {
        environment(\.selectedConversation, convo)
    }
}

