import{r as e,c as t,h as i,H as s}from"./p-BIwHMk6j.js";const o=class{constructor(i){e(this,i),this.itemChange=t(this,"itemChange"),this.handlePathChange=e=>{e.stopPropagation();const t=e.detail;if(!t){const e=this.item[Object.keys(this.item)[0]]||"ASC";return void this.itemChange.emit({"":e})}const i=Object.keys(this.item)[0],s=this.item[i]||"ASC";this.itemChange.emit({[t]:s})},this.handleToggleDirection=()=>{const e=Object.keys(this.item)[0]||"",t="ASC"===(this.item[e]||"ASC")?"DESC":"ASC";this.itemChange.emit({[e]:t})},this.handleRemove=()=>{this.itemChange.emit(null)}}render(){const e=Object.keys(this.item)[0]||"",t=this.item[e]||"ASC";return i(s,{key:"77f58753af7831ffe97728cdbc5b03ac68a47773"},i("limebb-property-selector",{key:"5d4c27d2f81ea7f1260298e16a52f9670d9fc641",platform:this.platform,context:this.context,limetype:this.limetype,label:"Property",value:e,required:!0,onChange:this.handlePathChange}),i("div",{key:"7e8ad17d20935c423f4d48d49761008622030ea3",class:"control-buttons"},i("limel-icon-button",{key:"c9f1b7cc8e6bc28bc1b61205a9ed791a7bd19403",icon:"ASC"===t?"sort_ascending":"sort_descending",label:"ASC"===t?"Ascending":"Descending",onClick:this.handleToggleDirection}),i("limel-icon-button",{key:"42b34e92359a662bce151c4daa300fc79d2fcbbb",icon:"trash",label:"Remove",onClick:this.handleRemove})))}};o.style="*{box-sizing:border-box}:host(limebb-lime-query-order-by-item){box-sizing:border-box;display:flex;flex-direction:row;align-items:flex-start;gap:0.5rem;width:100%}limebb-property-selector{flex-grow:1}.control-buttons{flex-shrink:0;display:flex;align-items:center;gap:0.25rem}";export{o as limebb_lime_query_order_by_item}