// 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_CONTENT_SUGGESTIONS_MAGIC_STACK_UI_MAGIC_STACK_COLLECTION_VIEW_H_
#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_MAGIC_STACK_UI_MAGIC_STACK_COLLECTION_VIEW_H_

#import <UIKit/UIKit.h>

#import "ios/chrome/browser/content_suggestions/magic_stack/ui/magic_stack_consumer.h"

typedef UICollectionViewDiffableDataSource<NSString*, MagicStackModule*>
    MagicStackDiffableDataSource;

@protocol MagicStackCollectionViewControllerAudience;
@protocol MagicStackModuleContainerDelegate;

// A UICollectionView that contains a horizontal list of Magic Stack cards.
@interface MagicStackCollectionViewController
    : UIViewController <MagicStackConsumer>

// Audience for Magic Stack module events.
@property(nonatomic, weak) id<MagicStackCollectionViewControllerAudience,
                              MagicStackModuleContainerDelegate>
    audience;

// Called when the module width has changed.
- (void)moduleWidthDidUpdate;

// Sets a custom collection view layout on the collection view.
- (void)updateCollectionViewLayout:(UICollectionViewLayout*)layout;

// Resets the Magic Stack.
- (void)reset;

@end

#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_MAGIC_STACK_UI_MAGIC_STACK_COLLECTION_VIEW_H_
