1import{PageElementBase as o}from"./CdQXFjpm.js";import{z as n,C as d}from"./BNATrUYe.js";import{d as h}from"./ghde6Rcn.js";import"./CATxlt2j.js";import"./CXTOca8g.js";import"./0xmjySIm.js";class a extends o{constructor(r="root",t){super(r,t),this.widgetType="WidgetParticipantCard",this.widgetName="Participant Card",this.component="WidgetParticipantCard",this.cmsComponent="WidgetParticipantCard",this.icon={icon:"participant",pack:"cms"},this.pseudoWidgetType="widget",this.showRank=!0,this.receiveImageFromMediaLibrary=i=>{var e;(e=this.style.background)!=null&&e.image&&(this.style.background.image.image=i)},this.buildContentFields=()=>{const{$gc:i}=n();return[{heading:"Player",options:[{type:"select",attributeKey:"participantID",maxHeight:250,items:i().darts.web().getParticipants().then(e=>e.data.map(s=>({id:s.id,name:`${s.attributes.firstName} ${s.attributes.lastName}`})))}]}]},this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:"theme",options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]},{heading:"Background",options:[{type:"background-selector",attributeKey:["style","background"],showTransparencyScale:!0,defaultColor:{value:"primary",shade:"500",opacity:1}}]},{heading:"Show hover interaction",toggleable:!0,toggleAttributeKey:"showHoverInteraction",options:[]}
1],this.getSidebarTabs=()=>[{name:"Layout",fields:this.buildLayoutFields(),hidden:!0},{name:"Content",fields:this.buildContentFields(),default:!0},{name:"Style",fields:this.buildStyleFields()}],this.theme=(t==null?void 0:t.theme)||"light",this.participantID=(t==null?void 0:t.participantID)||"",this.showHoverInteraction=(t==null?void 0:t.showHoverInteraction)||!0,this.style=d((t==null?void 0:t.style)||{background:{image:{image:""},color:{}}}),Object.assign(this,t)}serializeElement(){return{...super.serializeBaseElement(),participantID:this.participantID,theme:this.theme,showHoverInteraction:this.showHoverInteraction,style:this.style,showRank:this.showRank}}duplicateElement(){return new a(this.parentID,h({...this,uuid:void 0}))}}export{a as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.