# frozen_string_literal: true

require 'vagrant'

module VagrantPlugins
  module ProviderLocal
    module Errors
      # Namespace for Vagrant Local Errors
      class VagrantLocalError < Vagrant::Errors::VagrantError
        error_namespace('vagrant_local.errors')
      end

      # System Check Results
      class SystemVersionIsTooLow < VagrantLocalError
        error_key(:system_version_too_low)
      end

      # Compatability Check Tool
      class MissingCompatCheckTool < VagrantLocalError
        error_key(:missing_compatability_check_tool)
      end

      # Missing Bhyve
      class MissingBhyve < VagrantLocalError
        error_key(:missing_bhyve)
      end

      # HasNoRootPrivilege
      class HasNoRootPrivilege < VagrantLocalError
        error_key(:has_no_root_privilege)
      end

      # ExecuteError
      class ExecuteError < VagrantLocalError
        error_key(:execute_error)
      end

      # TimeoutError
      class TimeoutError < VagrantLocalError
        error_key(:timeout_error)
      end

      # VirtualBoxRunningConflictDetected
      class VirtualBoxRunningConflictDetected < VagrantLocalError
        error_key(:virtual_box_running_conflict_detected)
      end

      # AnsibleNotDetected
      class AnsibleNotDetected < VagrantLocalError
        error_key(:ansible_not_detected)
      end

      # AnsiblePlaybookNotDetected
      class AnsiblePlaybookNotDetected < VagrantLocalError
        error_key(:ansible_playbook_not_detected)
      end

      # NotYetImplemented
      class NotYetImplemented < VagrantLocalError
        error_key(:not_yet_implemented)
      end

      # TimeoutHalt
      class TimeoutHalt < VagrantLocalError
        error_key(:halt_timeout)
      end

      # InvalidbhyveBrand
      class InvalidbhyveBrand < VagrantLocalError
        error_key(:invalidbhyve_brand)
      end

      # InvalidLXBrand
      class InvalidLXBrand < VagrantLocalError
        error_key(:invalidLX_brand)
      end

      # ConsoleFailed
      class ConsoleFailed < VagrantLocalError
        error_key(:console_failed_exit)
      end
    end
  end
end