@namespace Connected.Components
@inherits UIComponent

<div @attributes="CustomAttributes" class="@Classname">
    <div class="input-control-input-container">
        @InputContent
        @if (!String.IsNullOrEmpty(Label))
        {
            <InputLabel Class="input-label-inputcontrol" Variant="@Variant" Disabled=@Disabled Error="@Error" 
                           Margin="@Margin" ForId="@ForId">
                @Label
            </InputLabel>
        }
    </div>
    @if (Error || !String.IsNullOrEmpty(HelperText) || !String.IsNullOrEmpty(CounterText))
    {
        <div class="@HelperContainer">
            <p class="@HelperClass">
                <div class="d-flex">
                    @if (Error)
                    {
                        <div class="me-auto" id="@ErrorId">
                            @ErrorText
                        </div>
                    }
                    else if (!String.IsNullOrEmpty(HelperText))
                    {
                        <div class="me-auto">
                            @HelperText
                        </div>
                    }
                    @if (!String.IsNullOrEmpty(CounterText))
                    {
                        <div class="ms-auto">
                            @CounterText
                        </div>            
                    }
                </div>
            </p>
        </div>
    }
    @ChildContent
</div>