{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
}}

<input
  ...attributes
  {{did-insert (set this 'input')}}
  type="checkbox"
  checked={{if this.checked 'checked' undefined}}
  id={{concat 'toggle-button-' this.guid}}
  onchange={{action 'change'}}
/>
<label
  {{did-insert (set this 'label')}}
  for={{concat 'toggle-button-' this.guid}}
>
  {{yield (hash
    click=(action 'click')
  )}}
</label>