using System;
using System.Collections;
using System.ComponentModel;

namespace QC.QTMSecurity;

[TypeConverter(typeof(QGroupsCollectionConverter))]
public class QGroupsCollection : CollectionBase, ICustomTypeDescriptor
{
	public string this[int index] => (string)base.List[index];

	public void Add(string group)
	{
		base.List.Add(group);
	}

	public void Remove(string group)
	{
		base.List.Remove(group);
	}

	public string GetClassName()
	{
		return TypeDescriptor.GetClassName(this, noCustomTypeDesc: true);
	}

	public AttributeCollection GetAttributes()
	{
		return TypeDescriptor.GetAttributes(this, noCustomTypeDesc: true);
	}

	public string GetComponentName()
	{
		return TypeDescriptor.GetComponentName(this, noCustomTypeDesc: true);
	}

	public TypeConverter GetConverter()
	{
		return TypeDescriptor.GetConverter(this, noCustomTypeDesc: true);
	}

	public EventDescriptor GetDefaultEvent()
	{
		return TypeDescriptor.GetDefaultEvent(this, noCustomTypeDesc: true);
	}

	public PropertyDescriptor GetDefaultProperty()
	{
		return TypeDescriptor.GetDefaultProperty(this, noCustomTypeDesc: true);
	}

	public object GetEditor(Type editorBaseType)
	{
		return TypeDescriptor.GetEditor(this, editorBaseType, noCustomTypeDesc: true);
	}

	public EventDescriptorCollection GetEvents(Attribute[] attributes)
	{
		return TypeDescriptor.GetEvents(this, attributes, noCustomTypeDesc: true);
	}

	public EventDescriptorCollection GetEvents()
	{
		return TypeDescriptor.GetEvents(this, noCustomTypeDesc: true);
	}

	public object GetPropertyOwner(PropertyDescriptor pd)
	{
		return this;
	}

	public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
	{
		return GetProperties();
	}

	public PropertyDescriptorCollection GetProperties()
	{
		return null;
	}
}
