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

module fusebox_action.mojom;

import "components/omnibox/composebox/composebox_query.mojom";

// LINT.IfChange(SuggestInventory)
// This enum is mapped to third_party/omnibox_proto/suggest_inventory.proto.
enum SuggestInventory {
  kDefault = 0,
  kTravel = 1,
  kAimTakeover = 2,
  kImageGenTakeover = 3,
  kConversationStarters = 4,
  kAiHpCreateChip = 5,
  kAiHpGetItDoneChip = 6,
  kAiHpSimplifyChip = 7,
  kAiHpIfl = 8,
  kAiHpReservations = 9,
  kBrainstorm = 10,
  kHelpMeLearn = 11,
  kWriteOrEdit = 12,
  kAddFile = 13,
  kAddTab = 14,
  kAimImages = 15,
};
// LINT.ThenChange(//third_party/omnibox_proto/suggest_inventory.proto:SuggestInventory)

// LINT.IfChange(QueryActionOverride)
enum QueryActionOverride {
  kDefault = 0,
  kPaste = 1,
  kHint = 2,
};
// LINT.ThenChange(//third_party/omnibox_proto/suggest_template_info.proto:QueryActionOverride)

// Maps to //third_party/omnibox_proto/input_source.proto.
enum InputSource {
  kInputSourceUnspecified = 0,
  kInputSourceGallery = 1,
  kInputSourceCamera = 2,
  kInputSourceFilePicker = 3,
  kInputSourceDrive = 4,
  kInputSourceTabPicker = 5,
  kInputSourceVoice = 6,
};

enum SearchboxOverride {
  // Requests that no searchbox be opened.
  kUnspecified = 0,
  kRealbox = 1,
  kComposebox = 2,
};

// Actions for the Fusebox (a fusion of "Composebox" and "Searchbox"), which can
// be either the Composebox (for AI queries) or the Searchbox (for non-AI
// queries). FuseboxAction carries optional client behavior and configuration to
// apply when the user accepts a suggestion. Its fields correspond to the
// client-supported subset of the SuggestTemplateInfo.FuseboxAction proto
// message in //third_party/omnibox_proto/suggest_template_info.proto. A null
// field means this action does not specify the corresponding setting or
// behavior, which is distinct from an explicit zero value.
struct FuseboxAction {
  // The tool to preselect, if specified.
  composebox_query.mojom.ToolMode? preselected_tool;
  // The suggestion inventory to show, if specified.
  SuggestInventory? preferred_inventory;
  // The model mode to preselect, if specified.
  composebox_query.mojom.ModelMode? preselected_model;
  // How to handle the suggestion query, if specified.
  QueryActionOverride? query_action_override;
  // The source that should be opened, if available.
  InputSource? preselected_input_source;
  // Whether and which searchbox to open, if specified.
  // Null means no override was provided.
  SearchboxOverride? searchbox_override;
};
