<template>
    <v-flex :class="TileClass" >
        <div class="WM-Tile">
            <v-layout row wrap class="Content">
                <div class="Check">
                    <WM-Checkbox v-model="props.selected" ItemText="" :ItemID="'Check'+props.item.id"></WM-Checkbox>
                </div>
                <div class="Number En">12</div>
                <v-flex xl2 class="Info" @click="$store.state.ClientDetails = true" slot="activator">
                    <div class="TitleFa">
                        <v-badge color="red">
                            <template v-slot:badge>
                                <span> {{ props.item.Level }} </span>
                            </template>
                            <span> {{ props.item.TitleFa }} </span>
                        </v-badge>
                    </div>
                    <div class="TitleEn Context"> {{ props.item.TitleEn }} </div>
                </v-flex>
                <v-flex xl1 class="Status text-lg-center">
                    <v-chip color="red" text-color="white"> بسته شده </v-chip>
                </v-flex>
                <v-flex xl1 class="Time text-lg-center">
                    سه شنبه  21 مهرماه <br> 12:22
                </v-flex>

                <v-flex xl2 class="text-lg-center">
                    <v-chip color="grey lighten-3" text-color="black" @click="$store.state.EventTimeline = true" slot="activator">
                        <v-avatar class="cyan WM-Color-White"> 2 </v-avatar>
                        رویداد پیش رو
                    </v-chip>
                    <v-btn small outline fab color="cyan" @click.native="$store.state.EventAdd = true" slot="activator">
                        <v-icon>fas fa-plus</v-icon>
                    </v-btn>
                </v-flex>

                <v-flex xl2 class="Price En LTR  text-lg-center">
                    <v-btn small outline fab color="black" @click.native="$store.state.TransactionAdd = true" slot="activator">
                        <v-icon>fas fa-plus</v-icon>
                    </v-btn>
                    <span class="NewPrice" @click="$store.state.TransactionTimeline = true" slot="activator">
                        {{ props.item.Price }} <span class="Unit"> IRT </span>
                    </span>
                </v-flex>

                <v-flex xl3 class="Buttons text-lg-center">
                    <v-tooltip top color="black">
                        <v-btn small @click.native="$store.state.ClientDetails = true" slot="activator" fab color="cyan" dark><v-icon dark>fas fa-align-right</v-icon></v-btn>
                        <span> جزئیات مشتری </span>
                    </v-tooltip>
                    <v-badge color="black" overlap >
                        <template v-slot:badge >
                            <span> {{ props.item.Level }} </span>
                        </template>
                        <v-tooltip top color="black">
                            <v-btn small @click.native="$store.state.ClientComments = true" slot="activator" fab color="black" dark><v-icon dark>fas fa-comments</v-icon></v-btn>
                            <span> کامنت ها </span>
                        </v-tooltip>
                    </v-badge>
                    <v-tooltip top color="black">
                        <v-btn small @click.native="$store.state.SendSMS = true" slot="activator" fab color="orange" dark><v-icon dark>fas fa-comment-alt</v-icon></v-btn>
                        <span> ارسال پیام کوتاه </span>
                    </v-tooltip>
                    <v-tooltip top color="black">
                        <v-btn small @click.native="$store.state.SendEmail = true" slot="activator" fab color="purple" dark><v-icon dark>fas fa-envelope</v-icon></v-btn>
                        <span> ارسال ایمیل </span>
                    </v-tooltip>
                    <v-tooltip top color="black">
                        <v-btn small slot="activator" fab color="grey lighten-4"><v-icon dark>fas fa-pencil-alt</v-icon></v-btn>
                        <span> ویرایش </span>
                    </v-tooltip>
                    <v-tooltip top color="black">
                        <v-btn small slot="activator" fab color="red" dark><v-icon dark>fas fa-trash-alt</v-icon></v-btn>
                        <span> حذف آیتم </span>
                    </v-tooltip>
                </v-flex>
            </v-layout>
        </div>
    </v-flex>
</template>
<script>
export default {
    props: {
        TileClass: { default: "xl12" },
        props: { default: "" },
    },
}
</script>
<style scoped lang="scss">
    .WM-Tile {
        width:100%;
        padding:10px;
        border: 1px solid #eeeeee;
        transition: 0.4s;
        border-radius: 5px;
        margin-bottom: 10px;
    }
    .WM-Tile:hover {
        border: 1px solid #000;
    }
    .WM-Tile.Shadowed {
        box-shadow: 0 10px 30px 0 rgba(0,0,0,.5);
        border-radius:5px;
    }
    .WM-Tile .Content {
        background-color:#fff;
        height:100%;
    }
    .WM-Tile .Image {
        width:100%;
    }
    .Content {
        padding:10px;
        margin:0px;
        position: relative;
    }
    .Content .Info {
        text-align:right;
        margin-right: 50px;
        cursor: pointer;
    }
    .Content .Check {
       position: absolute;
       right: 0px;
       width: 40px;
    }
    .Content .Number {
       position: absolute;
        right: -14px;
        bottom: -16px;
        line-height: 40px;
        width: 40px;
        font-size: 40px;
        color: rgb(224, 224, 224);
    }
    .Info .TitleEn {
        font-size:13px;
    }
    //-----------------------------------Price
    .Content .Price {
        text-align:left;
    }
    .Content .Price .Unit {
        font-size:12px;
    }
    .Price .NewPrice {
        font-size:24px;
    }
    .Price .OldPrice {
        font-size:14px;
        margin-left: 20px;
        text-decoration: line-through;
        text-decoration-color: #ee3552;
        color: #ee3552;
        margin-top: -5px;

    }

    //---------------------------Buttons-------------------------------
    .Content .Buttons {
        text-align: center;
    }
    .v-btn {
        margin: 6px 2px;
    }
    .v-btn--floating.v-btn--small .v-icon {
        font-size: 16px;
    }

    .v-btn--floating.v-btn--outline.v-btn:hover {
        background-color: inherit !important;
    }


</style>
