# frozen_string_literal: true

require_relative "backend_sgx"
require_relative "not_loaded"

class TrivialBackendSgxRepo
	def initialize(
		jid: CONFIG[:sgx],
		creds: CONFIG[:creds],
		component_jid: CONFIG[:component][:jid]
	)
		@jid = Blather::JID.new(jid)
		@creds = creds
		@component_jid = component_jid
	end

	def get(customer_id)
		BackendSgx.new(
			jid: @jid, creds: @creds,
			from_jid: Blather::JID.new("customer_#{customer_id}", @component_jid),
			ogm_url: NotLoaded.new(:ogm_url),
			fwd: NotLoaded.new(:fwd_timeout),
			transcription_enabled: NotLoaded.new(:transcription_enabled),
			registered?: NotLoaded.new(:registered?)
		)
	end
end
