-- Public Constructors


function RadioButtonGroupClass.new(frame, radioButtons)
	local self = setmetatable({}, RadioButtonGroupClass)
	
	self._Maid = Lazy.Utilities.Maid.new()
	self._ChangedBind = Instance.new("BindableEvent")
	self._ActiveRadio = radioButtons[1]
	
	self.Frame = frame
	self.RadioButtons = radioButtons
	self.Changed = self._ChangedBind.Event
	
	init(self)
	
	return self
end

function RadioButtonGroupClass.Create(list, max)
	local radios = {}
	
	local function instanceFunc(index, option)
		local radio = Lazy.Classes.RadioButtonLabel.Create(option)
		radio.Frame.LayoutOrder = index
		radios[index] = radio
		return radio.Frame
	end
	
	local frame = Lazy.Constructors.List.Create(list, max or #list, Enum.FillDirection.Vertical, UDim.new(0, 5), instanceFunc)
	
	return RadioButtonGroupClass.new(frame, radios)
end
