<!--
  ~ 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.
  ~
  -->

<div fxLayout="column" fxLayoutAlign="center center" fxFlex="100" class="w-100">
    <div
        *ngIf="adapterStatus.success"
        fxFlex="100"
        fxLayout="column"
        class="w-100"
    >
        <div>
            <div
                class="info-message"
                fxFlex="100"
                fxLayoutAlign="center center"
                fxLayout="row"
            >
                <i class="material-icons">done</i>
                <span data-cy="sp-connect-adapter-success-added"
                    >&nbsp;{{ adapterInstallationSuccessMessage }}</span
                >
            </div>
        </div>
    </div>
    <div
        fxLayout="column"
        fxLayoutAlign="center center"
        fxFlex="100"
        *ngIf="saveInDataLake && templateErrorMessage"
    >
        <div
            class="info-message warning-message"
            fxFlex="100"
            fxLayoutAlign="center center"
            fxLayout="row"
        >
            <i class="material-icons">warning</i>
            <span>&nbsp;{{ templateErrorMessage.notifications[0].title }}</span>
        </div>
    </div>
    <div
        fxLayout="column"
        fxLayoutAlign="center center"
        fxFlex="100"
        *ngIf="pipelineOperationStatus"
    >
        <sp-pipeline-started-status
            [pipelineOperationStatus]="pipelineOperationStatus"
        >
        </sp-pipeline-started-status>
        <mat-divider fxFlex="100"></mat-divider>
    </div>
    <div *ngIf="!adapterStatus.success">
        <div
            class="info-message warning-message"
            fxFlex="100"
            fxLayoutAlign="center center"
            fxLayout="column"
        >
            <div fxLayout="row">
                <i class="material-icons">error</i>
                <h4>Something went wrong during the adapter installation.</h4>
            </div>
            <h5>
                {{
                    adapterStatus.notifications.length > 0
                        ? adapterStatus.notifications[0].title
                        : 'Unknown Error'
                }}
            </h5>
        </div>
    </div>
</div>
