<p-overlayPanel #sharePanel appendTo="body">
    <ng-template pTemplate>
        <div class="share-elements">
            <div *ngIf="isSocialShareButtonVisible">
                <a class="share-element facebook" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{ link }}">
                    {{ 'SHARE.FACEBOOK' | translate }}
                </a>
            </div>
            <div *ngIf="isSocialShareButtonVisible">
                <a class="share-element vk" target="_blank" href="http://vk.com/share.php?url={{ link }}">
                    {{ 'SHARE.VK' | translate }}
                </a>
            </div>
            <div *ngIf="isSocialShareButtonVisible">
                <a class="share-element twitter" target="_blank" href="http://twitter.com/share?text=My Flight&url={{ link }}">
                    {{ 'SHARE.TWITTER' | translate }}
                </a>
            </div>
            <div *ngIf="isWeiboButtonVisible">
                <a class="share-element weibo" target="_blank" href="http://service.weibo.com/share/share.php?url={{ link }}">
                    {{ 'SHARE.WEIBO' | translate }}
                </a>
            </div>
            <div>
                <a class="share-element copy" [cdkCopyToClipboard]="link" (click)="panel.hide()">
                    {{ 'SHARE.COPY' | translate }}
                </a>
            </div>
        </div>
    </ng-template>
</p-overlayPanel>
