import ComposableArchitecture
import Dependencies
import Utilities

public extension Reducer {
    func withHooksGridClient(_ factory: @escaping (State) -> HooksGridClient) -> ReducerReader<State, Action, _DependencyKeyWritingReducer<Self>> {
        return .init { state, _ in
            self.transformDependency(\.self) { dependency in
                dependency[HooksGridClient.self] = factory(state)
            }
        }
    }
}
