1import{PageElementBase as l}from"./CdQXFjpm.js";import{G as n}from"./D_6K3OQ2.js";import{t as s}from"./CATxlt2j.js";import{d}from"./ghde6Rcn.js";import{C as a}from"./CL6gNd-P.js";import"./CXTOca8g.js";import"./0xmjySIm.js";import"./WUj_y4n6.js";class o extends l{constructor(t="root",i){super(t,i),this.widgetType="WidgetDivider",this.widgetName="Horizontal Line",this.component="WidgetDivider",this.cmsComponent="WidgetDivider",this.icon={icon:"horizontalLineWidget",pack:"cms"},this.pseudoWidgetType="widget",this.slogan="",this.image=a({image:""}),this.dividerType="crest",this.lineType="solid",this.lineColor=a({value:void 0,shade:void 0,opacity:void 0}),this.style=new n,this.actions=a([{linkType:"external",action:"",title:"",type:"primary",icon:{pack:"fan",icon:""},display:!0}]),this.buildLayoutFields=()=>[{heading:"Divider Type",options:[{type:"radio",subType:"list",attributeKey:"dividerType",options:[{label:"Crest",id:"crest"},{label:"Line",id:"line"},{label:"Button",id:"action"},{label:"Image",id:"image"},{label:"Slogan",id:"slogan"}]}]}],this.buildContentFields=e=>[{heading:"Button",disabled:(e==null?void 0:e.dividerType)!=="action",options:[{heading:"Label",type:"input",attributeKey:["actions","0","title"],placeholder:"Button Text"},{heading:"Link",type:"action-input",disabledLinkTypes:["file","tel","email"],attributeKey:["actions","0"],placeholder:"Button Link"},{heading:"Icon",type:"icon-selector",attributeKey:["actions","0","icon","icon"]},{heading:"Button Type",type:"select",attributeKey:["actions","0","type"],items:[{name:"Primary",id:"primary"},{name:"Secondary",id:"secondary"},{name:"Tertiary",id:"tertiary"}]}]},{heading:"Image",disabled:(e==null?void 0:e.dividerType)!=="image",options:[{type:"image-picker",attributeKey:["image"]}]},{heading:"Slogan",disabled:(e==null?void 0:e.dividerType)!=="slogan",options:[{type:"input",attributeKey:["slogan"],placeholder:"Slogan"}]}],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:"Line Type",options:[{type:"radio",subType:"list",attributeKey:"lineType",options:[{label:"Solid",id:"solid"},{label:"Dotted",id:"dotted"},{label:"Dashed",id:"dashed"}]}]},{heading:"Line Colour",options:[{type:"color-selector",attributeKey:["lineColor"]}]},{heading:"Text Colour",options:[{type:"color-selector",attributeKey:["style","color"]}]}],this.getSidebarTabs=e=>[{name:"Layout",fields:this.buildLayoutFields(),default:!0},{name:"Content",fields:this.buildContentFields(e)},{name:"Style",fields:this.buildStyleFields()}],i!=null&&i.widgetType&&!("version"in i)?Object.assign(this,this.normalizeLegacyElement(i)):Object.assign(this,s(i))}serializeElement(){return{...super.serializeBaseElement(),slogan:this.slogan,image:this.image,dividerType:this.dividerType,lineType:this.lineType,lineColor:this.lineColor,actions:this.actions,style:this.style}}duplicateElement(){return new o(this.parentID,d({...this,uuid:void 0}))}normalizeLegacyElement(t){var i;return{widgetType:"WidgetDivider",widgetName:"Divider",component:"WidgetDivider",icon:{icon:"horizontalLineWidget",pack:"cms"},uuid:t.uuid,image:t.image,style:{...t.style,theme:((i=t.style)==null?void 0:i.theme)||"light"},dividerType:"image",lineType:"solid"}}}export{o 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.