import{r as t,h as e}from"./p-b891c2f1.js";const i=class{constructor(e){t(this,e),this.date=new Date,this.hourFormat="auto",this.type="date"}render(){const t="timestamp"===this.type?1e3*parseInt(this.date.toString()):this.date,e=new Date(t),i="auto"===this.hourFormat?void 0:"12"===this.hourFormat;if(!isNaN(e.getMilliseconds()))return new Intl.DateTimeFormat(this.locale,{weekday:this.weekday,era:this.era,year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second,timeZoneName:this.timeZoneName,timeZone:this.timeZone,hour12:i}).format(e)}},s=class{constructor(e){t(this,e),this.tag="p",this.truncate=!1}render(){return e(this.tag,{class:{text:!0,"is-truncated":this.truncate}},e("slot",null))}};s.style=":host{display:block;--font-size:var(--font-size, var(--sc-font-size-medium));--font-weight:var(--font-size, var(--sc-font-weight-normal));--line-height:var(--font-size, var(--sc-line-height-medium));--text-align:left;--color:var(--color, inherit)}.text{margin:0;font-size:var(--font-size);font-weight:var(--font-weight);line-height:var(--line-height);text-align:var(--text-align);color:var(--color)}.text.is-truncated{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";export{i as sc_format_date,s as sc_text}