<div class="main-info" [formGroup]="formGroup">
	<div class="col-12 intro">
		{{'DMP-EDITOR.MAIN-INFO.INTRO' | translate}}
	</div>
	<div class="col-12 card">
		<!-- Title Field -->
		<div class="row">
			<div class="col-12">
				<div class="heading">1.1 {{'DMP-EDITOR.FIELDS.NAME' | translate}}*</div>
				<!-- <div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div> -->
				<div class="title-form">
					<mat-form-field>
						<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" formControlName="label" required>
						<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
							{{formGroup.get('label').getError('backendError').message}}</mat-error>
						<mat-error *ngIf="formGroup.get('label').hasError('required')">
							{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
					</mat-form-field>
				</div>
			</div>
		</div>
		<!-- Description field -->
		<div class="row">
			<div class="col-12">
				<div class="heading">1.2 {{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}</div>
				<div class="hint">{{'DMP-EDITOR.FIELDS.DESCRIPTION-HINT' | translate}}</div>
				<div class="description-form">
					<rich-text-editor-component [parentFormGroup]="formGroup" [controlName]="'description'"
												[placeholder]="'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'">
					</rich-text-editor-component>
				</div>
			</div>
		</div>
		<!-- Researchers field-->
		<div class="row">
			<div class="col-12">
				<div class="heading">1.3 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}</div>
				<div class="hint">
					<div class="pb-1">{{'DMP-EDITOR.FIELDS.RESEARCHERS-HINT' | translate}}</div>
					<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
				</div>
				<div class="researchers-form">
					<mat-form-field>
						<mat-label>{{'DMP-EDITOR.PLACEHOLDER.RESEARCHERS' | translate}}</mat-label>
						<app-multiple-auto-complete [formControl]="formGroup.get('researchers')" [configuration]="researchersAutoCompleteConfiguration">
						</app-multiple-auto-complete>
						<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
							{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
						<mat-error *ngIf="formGroup.get('researchers').hasError('required')">
							{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
						<!-- <button matSuffix class="input-btn" [disabled]="formGroup.get('researchers').disabled" type="button" (click)="addResearcher($event)">
							<mat-icon class="icon-btn">add_circle</mat-icon>
						</button> -->
					</mat-form-field>
					<div class="mb-4">
						<span *ngIf="!formGroup.get('researchers').disabled" class="not-found">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
						<span *ngIf="!formGroup.get('researchers').disabled" class="insert-manually" (click)="addResearcher($event)">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
					</div>
				</div>
			</div>
		</div>
		<!-- Organizations Field -->
		<div class="row">
			<div class="col-12">
				<div class="heading">1.4 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}</div>
				<div class="hint">
					<div class="pb-1">{{'DMP-EDITOR.FIELDS.ORGANISATIONS-HINT' | translate}}</div>
					<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
				</div>
				<div class="organizations-form">
					<mat-form-field>
						<mat-label>{{'DMP-EDITOR.PLACEHOLDER.ORGANIZATION' | translate}}</mat-label>
						<app-multiple-auto-complete [formControl]="formGroup.get('organisations')" [configuration]="organisationsAutoCompleteConfiguration">
						</app-multiple-auto-complete>
						<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
							{{formGroup.get('organisations').getError('backendError').message}}</mat-error>
						<mat-error *ngIf="formGroup.get('organisations').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
						<!-- <button *ngIf="showOrganizationCreator()" matSuffix class="input-btn" [disabled]="cantAddOrganizations()" type="button" (click)="addOrganization($event)">
							<mat-icon class="icon-btn">add_circle</mat-icon>
						</button> -->
					</mat-form-field>
					<div *ngIf="showOrganizationCreator()" class="mb-4">
						<span *ngIf="!cantAddOrganizations()" class="not-found">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
						<span *ngIf="!cantAddOrganizations()" class="insert-manually" (click)="addOrganization($event)">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
					</div>
				</div>
			</div>
		</div>
		<!-- Language field -->
		<div class="row">
			<div class="col-12">
				<div class="heading">1.5 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}*</div>
				<div class="hint">{{'DMP-EDITOR.FIELDS.LANGUAGE-HINT' | translate}}</div>
				<div class="language-form">
					<mat-form-field>
						<mat-select [formControl]="formGroup.get('extraProperties').get('language')" placeholder="{{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
							<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
								{{ lang.name }}
							</mat-option>
						</mat-select>
						<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('backendError')">
							{{formGroup.get('extraProperties').get('language').getError('backendError').message}}</mat-error>
						<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('required')">
							{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
					</mat-form-field>
				</div>
			</div>
		</div>
		<!-- Contact Field -->
		<div class="row">
			<div class="col-12">
				<div class="heading">1.6 {{'DMP-EDITOR.FIELDS.CONTACT' | translate}}*</div>
				<!-- <div class="hint">{{'DMP-EDITOR.LICENSE-INFO.HINT' | translate}}</div> -->
				<div class="contact-form">
					<mat-form-field>
						<mat-select [formControl]="formGroup.get('extraProperties').get('contact')" placeholder="{{'DMP-EDITOR.FIELDS.CONTACT' | translate}}">
							<mat-option *ngFor="let vis of getAssociates()" [value]="vis.id">
								{{vis.name | translate}}
							</mat-option>
						</mat-select>
						<mat-error *ngIf="formGroup.get('extraProperties').get('contact').hasError('backendError')">
							{{formGroup.get('extraProperties').get('contact').getError('backendError').message}}</mat-error>
						<mat-error *ngIf="formGroup.get('extraProperties').get('contact').hasError('required')">
							{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
					</mat-form-field>
				</div>
			</div>
		</div>
	</div>
</div>
