// 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 skills.mojom;

import "mojo/public/mojom/base/time.mojom";
import "url/mojom/url.mojom";

// LINT.IfChange(SkillSource)
enum SkillSource {
  kUnknown = 0,
  // Skill created by Google.
  kFirstParty = 1,
  // Skill created by an end-user.
  kUserCreated = 2,
  // Skill derived from a first party skill.
  kDerivedFromFirstParty = 3,
  // Skill sourced from the EnterprisePublishedSkills enterprise policy.
  kEnterprise = 4,
  // Skill derived from an enterprise skill.
  kDerivedFromEnterprise = 5,
};
// clang-format off
// LINT.ThenChange(//components/sync/protocol/skill_specifics.proto:SkillSource,
// chrome/browser/glic/host/glic.mojom:SkillSource,
// chrome/test/data/webui/glic/test_client/index.html:SkillSource)
// clang-format on

// LINT.IfChange(Skill)
// Represents a single skill.
struct Skill {
  // A unique identifier for the skill. It's GUID now but can be other IDs in
  // the future.
  string id;

  // The source skill id that this skill is derived from. This field is only
  // present if the SkillSource is kDerivedFromFirstParty.
  string? source_skill_id;

  // The user-facing name of the skill.
  string name;

  // The icon for the skill, will be using emojis for now.
  string icon;

  // The underlying LLM prompt for the skill.
  string prompt;

  // The source of the skill which can be 1P or user created.
  SkillSource source;

  // The description of the skill.
  string description;

  // The name of the curator for this skill, if any.
  string? curated_by;

  // The image URL for the skill.
  url.mojom.Url? image_url;

  // The Time when the skill was created.
  mojo_base.mojom.Time creation_time;

  // The Time when the skill was last updated.
  mojo_base.mojom.Time last_update_time;

  // The category of the skill.
  string? category;
};
// clang-format off
// LINT.ThenChange(//components/skills/public/skill.h:Skill, //chrome/browser/glic/host/glic.mojom:Skill)
// clang-format on

// Represents special topics on the chrome://skills/browse page.
struct TopicInfo {
  // The actual category name, such as "PartnerPicks".
  string category_name;
  // The title for the special topic, such as "Partner Spotlight".
  string display_name;
};

// The type of skills dialog to open.
enum SkillsDialogType {
  // Add dialog.
  kAdd,
  // Edit dialog.
  kEdit,
};
