import{r as l,h as t,H as s}from"./p-91e1cdd0.js";import{i as e,o as i,d as a}from"./p-054d1471.js";import{e as o,O as n,d as r}from"./p-ea120e31.js";function c(l){return!o(l)&&l-parseFloat(l)+1>=0}function u(l){const{index:t,period:s,subscriber:e}=l;if(e.next(t),!e.closed){if(-1===s)return e.complete();l.index=t+1,this.schedule(l,s)}}const d=l=>{const t=document.querySelector('script[data-fl-namespace="design-system"][data-fl-resources-url]'),s=t&&t.getAttribute("data-fl-resources-url")||"";try{return new URL(l,s).href}catch(t){return`${s}/${l}`}},m=class{constructor(t){l(this,t),this.data=["Apple","Application","Appetizer","Anna","Banana","Archery","Apogee"].map((l=>({label:l,value:l}))),this.searchFunction=l=>{const t=this.data.filter((t=>t.label.toLowerCase().includes(l.toLowerCase())));return i(t).pipe(a(1e3)).toPromise()}}render(){return t(s,null,t("link",{rel:"stylesheet",href:d("beacon.css"),media:"all"}),this.themeCssUrl&&t("link",{rel:"stylesheet",href:this.themeCssUrl,media:"all"}),t("div",{class:"container m-3 p-5 shadow"},t("h1",null,"Beacon"),t("h5",null,"Flare-Apollo Component Library 🚀"),t("div",{class:"row"},t("div",{class:"col"},t("ul",{class:"list-group"},t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Typography"),t("div",{class:"col"},t("h1",null,"h1 Heading"),t("h2",null,"h2 Sub-heading"),t("h3",null,"h3 Sub-heading"),t("h4",null,"h4 Sub-heading"),t("p",null,"Paragraph"),t("div",{class:"d-flex flex-column"},t("strong",null,"Strong"),t("small",null,"small"),t("a",{href:"https://www.flarehr.com",target:"_blank"},"Weblink")))),t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Buttons"),t("div",{class:"col-3 my-2"},this.renderButtonVariants())),t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Loading indicator"),t("div",{class:"col"},t("fl-loading-indicator",null),t("fl-loading-indicator",{theme:"dark"}))),t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Dropdown"),t("div",{class:"col-4"},t("fl-dropdown",{options:this.data}))),t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Async Dropdown"),t("div",{class:"col-4"},t("fl-dropdown-async",{"min-search-string-length":"2",searchFunction:this.searchFunction}))),t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Promise Button"),t("div",{class:"col-3 my-2"},t("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.takeTime()},"Promise Button block")),t("div",{class:"col-3 my-2"},t("fl-promise-button",{promiseFn:()=>this.takeTime()},"Promise Button")),t("div",{class:"col-3 my-2"},t("fl-promise-button",{variant:"secondary",promiseFn:()=>this.takeTime()},"Secondary Promise Button"))),t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Radio buttons"),t("div",{class:"col my-2"},t("div",{class:"form-check fl-radio-container"},t("input",{class:"form-check-input",type:"radio",name:"flexRadioDefault",id:"flexRadioDefault"}),t("label",{class:"form-check-label",htmlFor:"flexRadioDefault"},"Default radio")))),t("li",{class:"list-group-item"},t("small",{class:"text-muted"},"Checkboxes"),t("div",{class:"col my-2"},t("div",{class:"form-check fl-checkbox-container"},t("input",{class:"form-check-input",type:"checkbox",id:"flexCheckDefault"}),t("label",{class:"form-check-label",htmlFor:"flexCheckDefault"},"Default checkbox")))))))))}renderButtonVariants(){return t("ul",{class:"list-group"},t("li",{class:"list-group-item"},t("i",null,"Primary"),t("fl-button",{isBlockElement:!0},"Button")),t("li",{class:"list-group-item"},t("i",null,"Primary, disabled"),t("fl-button",{isBlockElement:!0,disabled:!0},"Button")),t("li",{class:"list-group-item"},t("i",null,"Primary Outline"),t("fl-button",{isBlockElement:!0,outline:!0},"Button")),t("li",{class:"list-group-item"},t("i",null,"Primary Outline, disabled"),t("fl-button",{isBlockElement:!0,disabled:!0,outline:!0},"Button")),t("li",{class:"list-group-item"},t("i",null,"Secondary"),t("fl-button",{isBlockElement:!0,variant:"secondary"},"Button")),t("li",{class:"list-group-item"},t("i",null,"Secondary, disabled"),t("fl-button",{isBlockElement:!0,disabled:!0,variant:"secondary"},"Button")),t("li",{class:"list-group-item"},t("i",null,"Secondary Outline"),t("fl-button",{isBlockElement:!0,variant:"secondary",outline:!0},"Button")),t("li",{class:"list-group-item"},t("i",null,"Secondary Outline, disabled"),t("fl-button",{isBlockElement:!0,disabled:!0,variant:"secondary",outline:!0},"Button")))}async takeTime(){return function(l=0,t,s){let i=-1;return c(t)?i=Number(t)<1?1:Number(t):e(t)&&(s=t),e(s)||(s=r),new n((t=>{const e=c(l)?l:+l-s.now();return s.schedule(u,e,{index:0,period:i,subscriber:t})}))}(2e3*Math.random()+2e3).toPromise()}};m.style="";export{m as fl_style_guide}