(function(n,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(n=typeof globalThis<"u"?globalThis:n||self,l(n.LimelightCommonWebComponents={},n.Vue))})(this,(function(n,l){"use strict";const d=["disabled"],u=((e,t)=>{const i=e.__vccOpts||e;for(const[a,r]of t)i[a]=r;return i})(l.defineComponent({__name:"LimelightButton",props:{variant:{},disabled:{type:Boolean}},setup(e){return(t,i)=>(l.openBlock(),l.createElementBlock("button",{type:"button",class:l.normalizeClass(["btn",[e.variant&&`btn--${e.variant}`,{"btn--disabled":e.disabled}]]),disabled:e.disabled},[l.renderSlot(t.$slots,"default",{},void 0,!0)],10,d))}}),[["__scopeId","data-v-e0bc8f43"]]);function m(e,t){return typeof FileMaker>"u"?!1:(FileMaker.PerformScript(e,t),!0)}function p(e,t,i){return typeof FileMaker>"u"?!1:(FileMaker.PerformScriptWithOption(e,t,i),!0)}const o=new Map;let k=1;function b(e,t="",i){return new Promise((a,r)=>{if(typeof FileMaker>"u"){r({callbackId:-1,message:"FileMaker runtime not available"});return}const c=k++;o.set(c,{resolve:a,reject:r});const M={callbackId:c,parameter:t};FileMaker.PerformScript(e,JSON.stringify(M)),i!==void 0&&setTimeout(()=>{o.has(c)&&(o.delete(c),r({callbackId:c,message:`Timed out after ${i}ms`}))},i)})}function F(e,t="",i){const a=parseInt(e),r=o.get(a);r&&(o.delete(a),i?r.reject({callbackId:a,message:t}):r.resolve(t))}function f(e,t,i=10,a=0){s()?e():a>=i?t==null||t():setTimeout(()=>f(e,t,i,a+1),100)}function s(){return typeof FileMaker<"u"}n.LimelightButton=u,n.callFileMakerScript=b,n.isFileMakerEnvironment=s,n.performScript=m,n.performScriptWithOption=p,n.resolveFileMakerCallback=F,n.waitForFileMaker=f,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
