# typed: strict
# Thumbnail types for different uses
class Domain::ThumbnailType < T::Enum
  extend T::Sig

  enums do
    Small = new
    Medium = new
    Large = new
    PHash = new
  end

  sig { returns(String) }
  def name
    case self
    when Small
      "small"
    when Medium
      "medium"
    when Large
      "large"
    when PHash
      "phash"
    end
  end

  sig { returns(Integer) }
  def width
    case self
    when Small
      128
    when Medium
      256
    when Large
      512
    when PHash
      32
    end
  end

  sig { returns(Integer) }
  def height
    width
  end

  sig { returns(Integer) }
  def quality
    70
  end
end
