class t{constructor(){this.sortable=!0,this.visible=!0}componentWillLoad(){this.updateFormat()}componentDidLoad(){this.change()}componentDidUpdate(){this.change()}componentDidUnload(){this.change()}updateFormat(){if("string"==typeof this.format){let t;try{t=JSON.parse(this.format)}catch(e){if(!/SyntaxError/.test(e))throw e;-1!==["currency","decimal","percent"].indexOf(this.format)&&(t={style:this.format},"currency"===this.format&&(t.currency="USD"))}this.format=t}}change(){this.glTableColumnChanged.emit(this)}static get is(){return"gl-table-column"}static get properties(){return{attribute:{type:String,attr:"attribute"},component:{type:String,attr:"component"},componentProps:{type:"Any",attr:"component-props"},format:{type:"Any",attr:"format",mutable:!0,watchCallbacks:["updateFormat"]},label:{type:String,attr:"label"},sortable:{type:Boolean,attr:"sortable"},visible:{type:Boolean,attr:"visible"}}}static get events(){return[{name:"glTableColumnChanged",method:"glTableColumnChanged",bubbles:!0,cancelable:!0,composed:!0}]}}export{t as GlTableColumn};