"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[8920],{88920:function(t,e,n){n.r(e),n.d(e,{default:function(){return A}});var i=n(20641);const s={class:"sort-buttons"},a={class:"sort-buttons-dropdown-body"};function o(t,e,n,o,l,c){const r=(0,i.g2)("DropdownItem"),u=(0,i.g2)("Dropdown");return(0,i.uX)(),(0,i.CE)("div",s,[(0,i.bF)(u,{"icon-class":c.btnIconClass,glow:"",right:"",title:c.title},{default:(0,i.k6)(()=>[(0,i.Lk)("div",a,[e[6]||(e[6]=(0,i.Lk)("div",{class:"title"},"Sort Direction",-1)),(0,i.bF)(r,{text:"Ascending","icon-class":"fa fa-arrow-up-short-wide","item-class":{active:!n.value?.desc},onInput:e[0]||(e[0]=t=>c.onDescChange(!1))},null,8,["item-class"]),(0,i.bF)(r,{text:"Descending","icon-class":"fa fa-arrow-down-wide-short","item-class":{active:n.value?.desc},onInput:e[1]||(e[1]=t=>c.onDescChange(!0))},null,8,["item-class"]),e[7]||(e[7]=(0,i.Lk)("div",{class:"title"},"Sort By",-1)),(0,i.bF)(r,{text:"Name","icon-class":"fa fa-font","item-class":{active:"title"===n.value?.attr},onInput:e[2]||(e[2]=t=>c.onAttrChange("title"))},null,8,["item-class"]),n.withReleaseDate?((0,i.uX)(),(0,i.Wv)(r,{key:0,text:"Release Date","icon-class":"fa fa-calendar","item-class":{active:"year"===n.value?.attr},onInput:e[3]||(e[3]=t=>c.onAttrChange("year"))},null,8,["item-class"])):(0,i.Q3)("",!0),n.withCriticRating?((0,i.uX)(),(0,i.Wv)(r,{key:1,text:"Critics Rating","icon-class":"fa fa-star","item-class":{active:"critic_rating"===n.value?.attr},onInput:e[4]||(e[4]=t=>c.onAttrChange("critic_rating"))},null,8,["item-class"])):(0,i.Q3)("",!0),n.withCommunityRating?((0,i.uX)(),(0,i.Wv)(r,{key:2,text:"Community Rating","icon-class":"fa fa-users","item-class":{active:"community_rating"===n.value?.attr},onInput:e[5]||(e[5]=t=>c.onAttrChange("community_rating"))},null,8,["item-class"])):(0,i.Q3)("",!0)])]),_:1},8,["icon-class","title"])])}var l=n(53751),c=n(90033);const r={class:"floating-dropdown-container"},u={class:"body-container hidden",ref:"dropdownContainer"};function d(t,e,n,s,a,o){const d=(0,i.g2)("FloatingButton"),p=(0,i.g2)("DropdownBody");return(0,i.uX)(),(0,i.CE)("div",r,[(0,i.bF)(d,{disabled:t.disabled,iconClass:t.iconClass,iconUrl:t.iconUrl,glow:t.glow,left:t.left,right:t.right,title:t.title,top:t.top,bottom:t.bottom,ref:"button",onClick:e[0]||(e[0]=(0,l.D$)(e=>t.toggle(e),["stop"]))},null,8,["disabled","iconClass","iconUrl","glow","left","right","title","top","bottom"]),(0,i.Lk)("div",u,[(0,i.bF)(p,{id:t.id,keepOpenOnItemClick:t.keepOpenOnItemClick,style:(0,c.Tr)(t.style),ref:"dropdown",onClick:t.onClick},{default:(0,i.k6)(()=>[(0,i.RG)(t.$slots,"default",{},void 0,!0)]),_:3},8,["id","keepOpenOnItemClick","style","onClick"])],512)])}var p=n(49479),g=n(1573),m=n(30656),h={mixins:[p.A,m.A],emits:["click"],components:{DropdownBody:g.A,FloatingButton:m.A}},f=n(66262);const v=(0,f.A)(h,[["render",d],["__scopeId","data-v-2e3f2ab5"]]);var w=v,C=n(85853),y=n(91387),k={emits:["input"],mixins:[y.A],components:{Dropdown:w,DropdownItem:C.A},props:{value:{type:Object,required:!0},withReleaseDate:{type:Boolean,default:!1},withCriticRating:{type:Boolean,default:!1},withCommunityRating:{type:Boolean,default:!1}},computed:{btnIconClass(){return this.value?.desc?"fa fa-arrow-down-wide-short":"fa fa-arrow-up-short-wide"},title(){return"Sort By: "+(this.value?.attr??"[none]")+" "+(this.value?.desc?"descending":"ascending")}},methods:{onAttrChange(t){this.$emit("input",{attr:t,desc:!!this.value?.desc})},onDescChange(t){this.$emit("input",{attr:this.value?.attr,desc:t})}},watch:{value(){this.setUrlArgs({sort:this.value?.attr,desc:this.value?.desc})}},mounted(){const t=this.getUrlArgs(),e=t.sort,n="true"===t.desc?.toString();(e||n)&&this.$emit("input",{attr:e,desc:n})},unmounted(){this.setUrlArgs({sort:null,desc:null})}};const b=(0,f.A)(k,[["render",o]]);var A=b}}]);
//# sourceMappingURL=8920.ed98c8d6.js.map