# LDC INPUT

## Usage

```html

<lib-ldc-input
        [controller]="controller"
        [label]="label"
        [type]="inputType.text"
        [placeholder]="Placeholder"
        [isAutocomplete]="isAutocomplete"
        [isAutofocus]="isAutofocus"
        [isDisabled]="isDisabled"
        (inputValueChanged)="onInputValueChanged($event)"
></lib-ldc-input>
```

```typescript
import {Component} from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
  controller = new FormControl();
  label = 'Label';
  inputType = InputType;
  placeholder = 'Placeholder';
  isAutocomplete = false;
  isAutofocus = false;
  isDisabled = false;
  
  onInputValueChanged(event: InputValueChanged) {
    console.log(event);
  }
}
```

### Properties

| Name           | Type        | Description                              |
|----------------|-------------|------------------------------------------|
| controller     | FormControl | The form control associated to the input |
| label          | string      | The label of the input                   |
| type           | InputType   | The type of the input                    |
| placeholder    | string      | The placeholder of the input             |
| isAutocomplete | boolean     | Whether the input is autocomplete or not |
| isAutofocus    | boolean     | Whether the input is autofocus or not    |
| isDisabled     | boolean     | Whether the input is disabled or not     |

### Events

| Name              | Type                            | Description                                                                                                                                                                                                                                     |
|-------------------|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| inputValueChanged | EventEmitter<InputValueChanged> | Emits the value of the input when it changes. The value is an object with the following properties: `value` (the value of the input), `controller` (the form control associated to the input) and `event` (the event that triggered the change) |
