import {Component} from '@angular/core';

@Component({
  selector: 'app-experience-square',
  templateUrl: './experience-square.component.html',
  styleUrls: ['./experience-square.component.scss']
})


export class ExperienceSquareComponent {


  tabs = [
    {
      name: '与我相关',
      icon: 'android'
    },
    {
      name: '最新发布',
      icon: 'android'
    },
    {
      name: '最新回复',
      icon: 'android'
    },
    {
      name: '最热',
      icon: 'android'
    },
    {
      name: '有问题',
      icon: 'android'
    },
  ];

  //广场数据
  data = [
    {
      author: 'Han Solo',
      avatar: 'http://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
      content:
        'We supply a series of design principles, practical patterns and high quality design resources' +
        '(Sketch and Axure), to help people create their product prototypes beautifully and efficiently.',
    },
  ];
  //children: [
  //       {
  //         author: 'Han Solo',
  //         avatar: 'http://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
  //         content:
  //           'We supply a series of design principles, practical patterns and high quality design resources' +
  //           '(Sketch and Axure), to help people create their product prototypes beautifully and efficiently.',
  //         children: [
  //           {
  //             author: 'Han Solo',
  //             avatar: 'http://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
  //             content:
  //               'We supply a series of design principles, practical patterns and high quality design resources' +
  //               '(Sketch and Axure), to help people create their product prototypes beautifully and efficiently.'
  //           },
  //           {
  //             author: 'Han Solo',
  //             avatar: 'http://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
  //             content:
  //               'We supply a series of design principles, practical patterns and high quality design resources' +
  //               '(Sketch and Axure), to help people create their product prototypes beautifully and efficiently.'
  //           }
  //         ]
  //       }
  //     ]
  //          <nz-comment-action>
  //          <span nz-tooltip="评论" (click)="toggleIsMessage(comment)">
  //             <i nz-icon nzType="message"></i>
  //           </span>
  //           </nz-comment-action>
  //           <ng-container *ngIf="comment.children && comment.children.length && comment.isMessage">
  //             <ng-template ngFor let-child [ngForOf]="comment.children">
  //               <ng-template
  //                 [ngTemplateOutlet]="commentTemplateRef"
  //                 [ngTemplateOutletContext]="{ comment: child }"
  //               ></ng-template>
  //             </ng-template>
  //           </ng-container>

  toggleLike(comment: any): void {
    comment.liked = !comment.liked;
  }

  toggleIsMessage(comment: any): void {
    comment.isMessage = !comment.isMessage
  }

  toggleIsConcern(comment: any): void {
    comment.isConcern = !comment.isConcern
  }
}
