1import{PageElementBase as h}from"./CdQXFjpm.js";import{G as u}from"./D9_5-rcx.js";import{G as g}from"./DA0pkXRu.js";import{G as p}from"./D_6K3OQ2.js";import{G as c}from"./WUj_y4n6.js";import{TypographyModel as b}from"./C8oKskU6.js";import{z as f,k as w}from"./C-O3A2g9.js";import{d as C}from"./ghde6Rcn.js";import"./CATxlt2j.js";import"./CXTOca8g.js";import"./0xmjySIm.js";import"./Bvf7Ass8.js";class m extends h{constructor(t="root",e){var i,l,r,n,d,y;super(t,e),this.widgetType="WidgetStreamlineBannerTextFriendly",this.component="WidgetStreamlineBannerTextFriendly",this.widgetName="Text Friendly",this.icon={icon:"impact-text-friendly",pack:"cms"},this.pseudoWidgetType="hero",this.autoPlay=!0,this.pillStyle="default",this.pillColor=new c,this.showProgress=!0,this.style=new p({theme:"light"}),this.title=new b({content:void 0,size:"3xl",textTransform:"uppercase",alignment:"start",font:"primary",lineClamp:3,show:!0}),this.getSidebarTabs=a=>[{name:"Layout",fields:this.buildLayoutFields(a)},{name:"Content",fields:this.buildContentFields(a),default:!0},{name:"Style",fields:this.buildStyleFields()}],this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:["style","theme"],options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]},{heading:"Pagination Colour",options:[{type:"color-input",label:"Dots",attributeKey:["pillColor"]}]}],this.buildLayoutFields=a=>[{heading:"Title",toggleable:!0,toggleAttributeKey:["title","show"],options:[{type:"typography-input",attributeKey:["title"],exclude:["content"]}]},{heading:"Autoplay",options:[{type:"switch",attributeKey:"autoPlay",label:"Auto-advance slides"},{attributeKey:"showProgress",type:"switch",label:"Show Pill Progress"}]},{heading:"Pagination Speed",disabled:!(a!=null&&a.autoPlay),options:[{type:"radio",subType:"row",attributeKey:["delay"],options:[{label:"Slow",id:"8000",icon:{icon:"slow",pack:"cms"}},{label:"Medium",id:"5000",icon:{icon:"medium",pack:"cms"}},{label:"Fast",id:"3000",icon:{icon:"fast",pack:"cms"}}]}]},{heading:"Pill Style",options:[{type:"radio",subType:"row",attributeKey:["pillStyle"],options:[{label:"Default",id:"default"},{label:"Rounded",id:"rounded"},{label:"Square",id:"square"}]}]}];const o=w(),s=(e==null?void 0:e.parentID)==="root"&&((l=(i=o.public.menus)==null?void 0:i.header)==null?void 0:l.transparentBackground)&&{top:32};this.backgroundImage=(e==null?void 0:e.backgroundImage)??((n=(r=e==null?void 0:e.style)==null?void 0:r.background)==null?void 0:n.image)??new g,this.delay=(e==null?void 0:e.delay)??"5000",this.autoPlay=(e==null?void 0:e.autoPlay)??!0,this.pillStyle=(e==null?void 0:e.pillStyle)??"default",this.pillColor=(e==null?void 0:e.pillColor)??this.pillColor,this.showProgress=(e==null?void 0:e.showProgress)??!0,this.title=(e==null?void 0:e.title)??this.title,this.videos=(e==null?void 0:e.videos)??[],this.query=(e==null?void 0:e.query)||this.normalizeLegacyVideosToQuery(((d=e==null?void 0:e.videos)==null?void 0:d.map(a=>a.data.id))??[]),this.style=new p({theme:(e==null?void 0:e.theme)??((y=e==null?void 0:e.style)==null?void 0:y.theme)??"light",padding:s})}serializeElement(){return{...this.serializeBaseElement(),backgroundImage:this.backgroundImage,autoPlay:this.autoPlay,pillStyle:this.pillStyle,pillColor:this.pillColor,showProgress:this.showProgress,title:this.title,videos:this.videos,delay:this.delay,style:this.style,query:this.query}}normalizeLegacyVideosToQuery(t){return t.length?new u({type:"videos",method:"getByVideoID",manualFillIds:t,count:t.length,offset:0,autofillOptions:null,contentFill:"manual-fill"}):new u({type:"videos",method:"getLatest",contentFill:"auto-fill",count:5,offset:0,manualFillIds:null,autofillOptions:{}})}duplicateElement(){return new m(this.parentID,C({...this,uuid:void 0}))}buildContentFields(t){const{$gc:e}=f(),o=e().videos.web().getCategories().then(i=>i==null?void 0:i.data.map(l=>({name:l.attributes.name,id:l.attributes.name}))),s=e().news.web().getCategories().then(i=>i==null?void 0:i.map(l=>({name:l.newsCategory,id:l.newsCategoryID})));return[{type:"tabs",tabsOptions:{variant:"fill"},tabs:[{title:"Auto-Fill",value:"auto-fill",index:0,options:[{type:"query-builder",attributeKey:["query"],queryType:(t==null?void 0:t.query.type)==="videos"?"videos":"news",multiSelect:!1,ctaText:"Select from Modal",callback:i=>{t.query=Object.assign(t.query,i)}},{heading:"Content Type",type:"select",attributeKey:["query","type"],items:[{name:"News",id:"news"},{name:"Videos",id:"videos"}]},{heading:"Query Type",type:"select",attributeKey:["query","method"],items:(t==null?void 0:t.query.type)==="news"?[{name:"Latest",id:"getLatest"},{name:"Featured",id:"getIsFeatured"},{name:"By Category",id:"getByCategory"}]:[{name:"Latest",id:"getLatest"},{name:"By Category",id:"getByCategory"}]},{heading:"",type:"select",attributeKey:["query","autofillOptions","category"],hidden:(t==null?void 0:t.query.method)!=="getByCategory",items:(t==null?void 0:t.query.type)==="videos"?o:s},{heading:"Number of Cards",subHeading:"(Max 5)",type:"number",min:0,max:5,attributeKey:["query","count"]}]},{title:"Manual Fill",value:"manual-fill",disabled:!0,index:1,options:[]}],options:[]}]}}export{m 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.