<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

  <nz-modal [(nzVisible)]="isVisible" (nzOnCancel)="isVisible = false" nzTitle="{{ 'Create Model Registry' | translate }}" [nzWidth]="700">
    <form nz-form [formGroup]="modelForm" nzLayout="horizontal">
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>{{ 'Model Name' | translate }}</nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
            <input
            required
            nz-input
            type="text"
            name="modelName"
            id="modelName"
            formControlName="modelName"
          />
        </nz-form-control>
      </nz-form-item>
  
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24">{{ 'Tags' | translate }}</nz-form-label>
        <nz-form-control [nzSm]="14">
          <model-form-tags [tags]="tags.value"></model-form-tags>
        </nz-form-control>
      </nz-form-item>
  
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24">{{ 'Description' | translate }}</nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <textarea
            nz-input
            name="description"
            formControlName="description"
            id="description"
            [nzAutosize]="{ minRows: 2, maxRows: 6 }"
          ></textarea>
        </nz-form-control>
      </nz-form-item>
      <div *nzModalFooter>
        <button id="btn-cancel" nz-button nzType="default" (click)="closeModal()">{{ 'Cancel' | translate }}</button>
        <button id="btn-submit" nz-button nzType="primary" [disabled]="checkStatus()" (click)="submitForm()">
            {{ 'Create' | translate }}
        </button>
      </div>
    </form>
  </nz-modal>