<commit_before>import {Component, EventEmitter, Input, OnInit, Output} from "@angular/core";
import {DefineFeedService} from "../services/define-feed.service";
import {Feed} from "../../../model/feed/feed.model";

@Component({
    selector:"feed-toolbar-actions",
    template:`
      <div fxLayout="row" fxLayoutAlign="space-between" *ngIf="feed != undefined">
        <button mat-raised-button button color="accent" (click)="edit()" *ngIf="showEditLink">Edit</button>
        <button mat-button color="accent" (click)="deleteFeed()" *ngIf="showDeleteLink && feed.canEdit() && !feed.readonly"><span *ngIf="feed.isDraft()">Remove Draft</span> <span *ngIf="!feed.isDraft()">Delete Feed</span></button>
        <button mat-button color="accent" (click)="cancelEdit()" *ngIf="showCancelLink && feed.canEdit() &&  !feed.readonly ">Cancel</button>
      </div>
    `
    }
)
export class FeedToolbarActions implements OnInit {


    @Input()
    feed:Feed;

    @Input()
    showEditLink:boolean = false; //feed.canEdit() && feed.readonly

    @Input()
    showDeleteLink:boolean = false;

    @Input()
    showCancelLink:boolean = true;

    @Output()
    feedChange=new EventEmitter<Feed>();


    @Output()
    onEdit = new EventEmitter<Feed>();

    @Output()<commit_msg>remove delete button from top panel<commit_after>import {Component, EventEmitter, Input, OnInit, Output} from "@angular/core";
import {DefineFeedService} from "../services/define-feed.service";
import {Feed} from "../../../model/feed/feed.model";

@Component({
    selector:"feed-toolbar-actions",
    template:`
      <div fxLayout="row" fxLayoutAlign="space-between" *ngIf="feed != undefined">
        <button mat-raised-button button color="accent" (click)="edit()" *ngIf="showEditLink">Edit</button>
        <button mat-button color="accent" (click)="cancelEdit()" *ngIf="showCancelLink && feed.canEdit() &&  !feed.readonly ">Cancel</button>
      </div>
    `
    }
)
export class FeedToolbarActions implements OnInit {


    @Input()
    feed:Feed;

    @Input()
    showEditLink:boolean = false; //feed.canEdit() && feed.readonly

    @Input()
    showDeleteLink:boolean = false;

    @Input()
    showCancelLink:boolean = true;

    @Output()
    feedChange=new EventEmitter<Feed>();


    @Output()
    onEdit = new EventEmitter<Feed>();

    @Output()
{'fraction_non_alphanumeric': 0.17503217503217502, 'fraction_numerical': 0.0, 'mean_word_length': 3.9617021276595743, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1896572', 'n_tokens_mistral': 738, 'n_tokens_neox': 707, 'n_words': 146}