import 'package:oto/oto/commands/command.dart';

import 'git_branch.dart';
import 'git_remote.dart';
import 'git_revision.dart';
import 'git_stash.dart';

export 'git_branch.dart';
export 'git_remote.dart';
export 'git_revision.dart';
export 'git_stash.dart';

void registerGitCommands() {
  Command.register(
    CommandType.Git,
    () => Git(),
    spec: const CommandSpec(
      type: CommandType.Git,
      category: 'git',
      dataModel: 'DataGit',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitCommit,
    () => GitCommit(),
    spec: const CommandSpec(
      type: CommandType.GitCommit,
      category: 'git',
      dataModel: 'DataGitCommit',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitPull,
    () => GitPull(),
    spec: const CommandSpec(
      type: CommandType.GitPull,
      category: 'git',
      dataModel: 'DataGitPull',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitPush,
    () => GitPush(),
    spec: const CommandSpec(
      type: CommandType.GitPush,
      category: 'git',
      dataModel: 'DataGitPush',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitCheckout,
    () => GitCheckout(),
    spec: const CommandSpec(
      type: CommandType.GitCheckout,
      category: 'git',
      dataModel: 'DataGitCheckout',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitRev,
    () => GitRev(),
    spec: const CommandSpec(
      type: CommandType.GitRev,
      category: 'git',
      dataModel: 'DataGitRev',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitCount,
    () => GitCount(),
    spec: const CommandSpec(
      type: CommandType.GitCount,
      category: 'git',
      dataModel: 'DataGitCount',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitReset,
    () => GitReset(),
    spec: const CommandSpec(
      type: CommandType.GitReset,
      category: 'git',
      dataModel: 'DataGitReset',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitStashPush,
    () => GitStashPush(),
    spec: const CommandSpec(
      type: CommandType.GitStashPush,
      category: 'git',
      dataModel: 'DataGitStashPush',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitStashApply,
    () => GitStashApply(),
    spec: const CommandSpec(
      type: CommandType.GitStashApply,
      category: 'git',
      dataModel: 'DataGitStashApply',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
  Command.register(
    CommandType.GitBranch,
    () => GitBranch(),
    spec: const CommandSpec(
      type: CommandType.GitBranch,
      category: 'git',
      dataModel: 'DataGitBranch',
      samplePath: 'assets/yaml/sample/06_git.yaml',
    ),
  );
}
