// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef IOS_CHROME_BROWSER_AI_PROTOTYPING_UI_AI_PROTOTYPING_CONSUMER_H_
#define IOS_CHROME_BROWSER_AI_PROTOTYPING_UI_AI_PROTOTYPING_CONSUMER_H_

enum class AIPrototypingFeature : NSInteger;

// Consumer protocol for the mediator to interact with the view controller.
@protocol AIPrototypingConsumer <NSObject>

// Updates the result of a query that was previously executed on a model.
- (void)updateQueryResult:(NSString*)result
               forFeature:(AIPrototypingFeature)feature;

// Updates the list of available tabs.
// tabs: Array of dictionaries with keys "id", "title", "url".
- (void)updateTabList:(NSArray<NSDictionary*>*)tabs;

@optional
// Updates the representation of the current tabs Frames and contained
// ContentNodes, as fetched from the AnnotatedPageContent.
- (void)updateFramesAndContentNodesDebugString:(NSString*)framesAndContentNodes;

// Updates the list of frames in the current page context.
// frames: Array of dictionaries with keys "document_id", "url".
- (void)updateFrameList:(NSArray<NSDictionary*>*)frames;

// Updates the raw bytes (in Base64 representation) of the PageContext proto.
- (void)updateRawBytes:(NSString*)rawBytes
            forFeature:(AIPrototypingFeature)feature;

// Updates the window ID.
- (void)updateWindowId:(NSString*)windowId;

@end

#endif  // IOS_CHROME_BROWSER_AI_PROTOTYPING_UI_AI_PROTOTYPING_CONSUMER_H_
