mixin gameLogTab()
    .x-container(v-show="$refs.menu && $refs.menu.activeIndex === 'gameLog'")
        data-tables(v-bind="gameLogTable" v-loading="gameLogTable.loading")
            template(#tool)
                div(style="margin:0 0 10px;display:flex;align-items:center")
                    el-select(v-model="gameLogTable.filter" @change="gameLogTableLookup" multiple clearable collapse-tags style="flex:1" :placeholder="$t('view.game_log.filter_placeholder')")
                        el-option(v-once v-for="type in ['Location', 'OnPlayerJoined', 'OnPlayerLeft', 'PortalSpawn', 'Event', 'VideoPlay', 'StringLoad', 'ImageLoad']" :key="type" :label="type" :value="type")
                    el-input(v-model="gameLogTable.search" :placeholder="$t('view.game_log.search_placeholder')" @keyup.native.13="gameLogTableLookup" @change="gameLogTableLookup" clearable style="flex:none;width:150px;margin:0 10px")
                    //- el-tooltip(placement="bottom" content="Reload game log" :disabled="hideTooltips")
                    //-     el-button(type="default" @click="resetGameLog" icon="el-icon-refresh" circle style="flex:none")
            el-table-column(:label="$t('table.gameLog.date')" prop="created_at" sortable="custom" width="120")
                template(v-once #default="scope")
                    el-tooltip(placement="right")
                        template(#content)
                            span {{ scope.row.created_at | formatDate('long') }}
                        span {{ scope.row.created_at | formatDate('short') }}
            el-table-column(:label="$t('table.gameLog.type')" prop="type" width="120")
                template(v-once #default="scope")
                    span.x-link(v-if="scope.row.location && scope.row.type !== 'Location'" v-text="scope.row.type" @click="showWorldDialog(scope.row.location)")
                    span(v-else v-text="scope.row.type")
            el-table-column(:label="$t('table.gameLog.icon')" prop="isFriend" width="60")
                template(v-once #default="scope")
                    template(v-if="gameLogIsFriend(scope.row)")
                        el-tooltip(v-if="gameLogIsFavorite(scope.row)" placement="top" content="Favorite")
                            span ⭐
                        el-tooltip(v-else placement="top" content="Friend")
                            span 💚
            el-table-column(:label="$t('table.gameLog.user')" prop="displayName" width="180")
                template(v-once #default="scope")
                    span.x-link(v-if="scope.row.displayName" v-text="scope.row.displayName" @click="lookupUser(scope.row)" style="padding-right:10px")
            el-table-column(:label="$t('table.gameLog.detail')" prop="data")
                template(v-once #default="scope")
                    location(v-if="scope.row.type === 'Location'" :location="scope.row.location" :hint="scope.row.worldName" :grouphint="scope.row.groupName")
                    location(v-else-if="scope.row.type === 'PortalSpawn'" :location="scope.row.instanceId" :hint="scope.row.worldName" :grouphint="scope.row.groupName")
                    template(v-else-if="scope.row.type === 'Event'")
                        span(v-text="scope.row.data")
                    template(v-else-if="scope.row.type === 'VideoPlay'")
                        span(v-if="scope.row.videoId" style="margin-right:5px") {{ scope.row.videoId }}:
                        span(v-if="scope.row.videoId === 'LSMedia'" v-text="scope.row.videoName")
                        span.x-link(v-else-if="scope.row.videoName" @click="openExternalLink(scope.row.videoUrl)" v-text="scope.row.videoName")
                        span.x-link(v-else @click="openExternalLink(scope.row.videoUrl)" v-text="scope.row.videoUrl")
                    template(v-else-if="scope.row.type === 'ImageLoad'")
                        span.x-link(@click="openExternalLink(scope.row.resourceUrl)" v-text="scope.row.resourceUrl")
                    template(v-else-if="scope.row.type === 'StringLoad'")
                        span.x-link(@click="openExternalLink(scope.row.resourceUrl)" v-text="scope.row.resourceUrl")
                    template(v-else-if="scope.row.type === 'Notification' || scope.row.type === 'OnPlayerJoined' || scope.row.type === 'OnPlayerLeft'")
                    span.x-link(v-else v-text="scope.row.data")
            el-table-column(:label="$t('table.gameLog.action')" width="80" align="right")
                template(v-once #default="scope")
                    el-button(v-if="scope.row.type !== 'OnPlayerJoined' && scope.row.type !== 'OnPlayerLeft' && scope.row.type !== 'Location' && scope.row.type !== 'PortalSpawn'" type="text" icon="el-icon-close" size="mini" @click="deleteGameLogEntry(scope.row)")
