# typed: false
FactoryBot.define do
  factory :global_state do
    sequence(:key) { |n| "test_key_#{n}" }
    value { "test_value" }
    value_type { :string }

    trait :inkbunny_username do
      key { "inkbunny-username" }
      value { "testuser" }
      value_type { :string }
    end

    trait :inkbunny_password do
      key { "inkbunny-password" }
      value { "testpass" }
      value_type { :string }
    end

    trait :inkbunny_sid do
      key { "inkbunny-sid" }
      value { "testsid" }
      value_type { :string }
    end

    trait :counter do
      sequence(:key) { |n| "counter_#{n}" }
      value { "123" }
      value_type { :counter }
    end

    trait :duration do
      sequence(:key) { |n| "duration_#{n}" }
      value { "30s" }
      value_type { :duration }
    end

    trait :password do
      sequence(:key) { |n| "password_#{n}" }
      value { "secret" }
      value_type { :password }
    end
  end
end
