1import{_ as i,o as n,c as a,e as r,i as u,n as d,br as l,bs as c,a as s}from"./index-20f14846.js";const p={name:"Button",props:{disabled:{type:Boolean},primary:{type:Boolean,default:!0},secondary:{type:Boolean},danger:{type:Boolean},white:{type:Boolean},transparent:{type:Boolean},text:{type:Boolean},custom:{type:Boolean},size:{type:String,default:"md",validator:e=>["sm","md","lg","xl","2xl"].includes(e)},busy:{type:Boolean},autofocus:{type:Boolean}},mounted(){this.triggerAutoFocus()},watch:{autofocus:{immediate:!0,handler(){this.triggerAutoFocus()}}},computed:{variant(){return this.text?"text":this.white?"white":this.transparent?"transparent":this.secondary?"secondary":this.danger?"danger":this.custom?"custom":"primary"},isDisabled(){return this.busy||this.disabled}},methods:{triggerAutoFocus(){this.autofocus&&this.$refs.buttonElement&&this.$nextTick(()=>{this.$refs.buttonElement.focus()})}}},f=e=>(l("data-v-057c2df7"),e=e(),c(),e),m=["disabled"],h={key:1,class:"flex items-center"},_=f(()=>s("span",{class:"mr-2"},[s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",class:"animate-spin h-3 w-3","stroke-linecap":"round"},[s("path",{d:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48 2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48 2.83-2.83"})])],-1));function b(e,y,o,g,B,t){return n(),a("button",{type:"button",class:d(["inline-flex items-center border rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 pfui-button",[t.variant,o.size.replace("2xl","xxl"),{disabled:t.isDisabled}]]),disabled:t.isDisabled,ref:"buttonElement"},[o.busy?(n(),a("span",h,[r(e.$slots,"busy",{},()=>[_,u(" PLEASE WAIT... ")],!0)])):r(e.$slots,"default",{key:0},void 0,!0)],10,m)}const k=i(p,[["render",b],["__scopeId","data-v-057c2df7"],["__file","/home/jenkins/agent/workspace/PFGH_portal_main/node_modules/.pnpm/git+github.com+PacketFabric+pf_ui@f6e65ad308b54ee974489bbeaa89ec53c8300499_@mertasan+tailwind_qtfenx2n3qzykhtuqj6g35bepm/node_modules/@packetfabric/ui/components/button/Button.vue"]]);export{k as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.