<div class="container" *ngIf="!locForm">
    <div class="row pg-title"> Location
        <span class="searchIcon">
                    <input type="search" placeholder="What are you looking for?" [(ngModel)]="searchText" />
                    <!-- <input [(ngModel)]="searchText" placeholder="search text goes here"> -->
                    <!-- [(ngModel)]="userFilter.fullName" (keydown)="All(selected)" -->
            </span>
    </div>
    <div class="row pull-left"><span class="country_tile" *ngFor="let cname of topRowCountries; let color = index" [style.backgroundColor]="myColor[color]">{{cname.country}} &nbsp; &nbsp; {{cname.address.length}}</span></div>
    <br />
    <div class="row" *ngFor="let item of topRowCountries;let colorBdr = index">
        <div class="country_search">{{item.country}} &nbsp;
            <mat-icon (click)="showSearch(item.country, item)">
                more_horiz
            </mat-icon>
        </div>
        <br />
        <div class="styled_bdr" [style.borderLeftColor]="myColor[colorBdr]">
            <app-loc-tiles class="col-lg-4 col-md-4 col-sm-6 col-xs-12" *ngFor="let addr of item.address | filterss : searchText" [locDets]="addr" (locDeleteEvent)="deleteLocation($event)" (locEditEvent)="editLocationDet($event)"></app-loc-tiles>
        </div>
    </div>
    <!-- <app-loc-tiles class="col-lg-4 col-md-4 col-sm-6 col-xs-12" *ngFor="let locat of locations" [locDets]="locat" (locDeleteEvent)="deleteLocation($event)" (locEditEvent)="editLocationDet($event)"></app-loc-tiles> -->
    <button id="delLocModal" [hidden]="true" data-toggle="modal" data-target="#confirmDialog">Open Del Modal</button>
    <app-dialog [title]="dialogData.title" [text]="dialogData.text" (confirm)="confirmDelete($event)"></app-dialog>

    <a class="btn-text addNew_btn" (click)="addLocation()">
        <img src="{{img_path + 'add.png'}}">
    </a>
</div>
<div class="container" *ngIf="locForm">
    <app-loc-form *ngIf="addNewLocation" (cancelLocEvent)="formCancelled($event)"></app-loc-form>
    <app-loc-form *ngIf="!addNewLocation" (cancelLocEvent)="formCancelled($event)" [locDetEdit]='locDetEdit'></app-loc-form>
    <!-- [caEditDet]="caDetEdit" -->
</div>