import{h}from"@stencil/core";import{PauseIcon,PlayIcon}from"./icons";export class PrestoPlaylistItem{constructor(){this.active=!1,this.playing=!1}render(){return h("div",{class:{playlist__item:!0,"playlist__item-is--active":this.active,"playlist__item-is--playing":this.playing},onClick:()=>{this.playing?this.triggerPause.emit():this.triggerPlay.emit()}},h("div",{class:"playlist__title-wrap"},h("div",{class:"playlist__play-icon"},this.playing?h(PauseIcon,null):h(PlayIcon,null)),h("slot",{name:"item-title"})),h("div",{class:"playlist__time"},h("slot",{name:"item-duration"})))}static get is(){return"presto-playlist-item"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["presto-playlist-item.scss"]}}static get styleUrls(){return{$:["presto-playlist-item.css"]}}static get properties(){return{active:{type:"boolean",mutable:!1,complexType:{original:"boolean",resolved:"boolean",references:{}},required:!1,optional:!1,docs:{tags:[],text:"Active status"},attribute:"active",reflect:!1,defaultValue:"false"},playing:{type:"boolean",mutable:!1,complexType:{original:"boolean",resolved:"boolean",references:{}},required:!1,optional:!1,docs:{tags:[],text:"Playing status"},attribute:"playing",reflect:!1,defaultValue:"false"}}}static get events(){return[{method:"triggerPlay",name:"triggerPlay",bubbles:!0,cancelable:!0,composed:!0,docs:{tags:[],text:"Emit play event"},complexType:{original:"void",resolved:"void",references:{}}},{method:"triggerPause",name:"triggerPause",bubbles:!0,cancelable:!0,composed:!0,docs:{tags:[],text:"Emit pause event"},complexType:{original:"void",resolved:"void",references:{}}}]}}