import { h, H as Host, r as registerInstance, c as createEvent, g as getElement } from './index-090d31ca.js';
import { c as MapToComponentField, V as VegaSlimmer, M as MapToComponentMethod } from './global-slimmer-registry-0a7aa308.js';
import { I as InjectVegaSlimmer } from './inject-vega-slimmer-caffc2aa.js';
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-4202784a.js';
import { V as VegaInternalIconManager } from './internal-icon-manager-d55582f2.js';
import { s as sanitizeVegaComponent } from './component-d58ca1d0.js';
import { D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-61fda003.js';
import { c as VegaClick, h as VegaChange } from './vega-event-id-1b737ae8.js';
import { f as formatAndValidResponsiveToken } from './design-token-26117277.js';
import { F as FORM_ELEMENT_VALUE_CHANGE } from './static-subject-title-52f93124.js';
import { C as ChangeManager } from './change-manager-ecbd3a2a.js';
import { d as deepEqual } from './object-0c277f57.js';
import { h as htmlSanitizer, e as emptySanitizeStrategy } from './index-3b327f29.js';
import { c as createEventEmitSlimmer } from './event-emit-slimmer-50d423c0.js';
import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-1ff66f6c.js';
import { R as RequiredFieldRule } from './required-field-rule-ab4bdc47.js';
import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-558308bc.js';
import { g as getCurrentBreakpoint } from './breakpoints-332702ed.js';
import { T as TranslationSlimmer } from './translation-slimmer-cbbfbe82.js';
import './icon-manager-e586cf50.js';
import './create-public-api-runtime-metrics-slimmer-407de188.js';
import './dynamic-slimmer-60d5da5a.js';
import './misc-9fdbcfbb.js';
import './observer-3959f9dd.js';
import './dom-node-subject-factory-6894df15.js';
import './ui-6dd51115.js';
import './type-guard-5e7bf13e.js';
import './breakpoints-d9faf11c.js';
import './ui-93922c59.js';
import './regex-13ca296a.js';
import './typography-396de03f.js';
import './internal-translation-controller-0776fa78.js';
import './responsive-format-facade-d32134a3.js';
import './number-4398f2e1.js';
import './pixel-f32c07ce.js';
import './array-7888f339.js';
import './feature-flag-controller-b7e7da75.js';
import './index-bfc6dfa2.js';
import './state-border-formatter-7828a6a8.js';
import './try-get-document-bef0f526.js';
import './internal-vega-event-manager-a19d633d.js';
import './string-a953eafc.js';
import './vega-internal-event-id-a2d4c714.js';
import './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
import './mutation-observer-slimmer-f6fcd32a.js';
import './mutation-observer-filters-1a054fb0.js';
import './sub-state-observer-slimmer-884e6f43.js';

var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
class VegaSignatureCaptureRenderer extends VegaSlimmer {
  render() {
    return h(Host, null, this.mode === 'written' && this.writtenModeRenderer.render());
  }
}
__decorate$3([
  MapToComponentField()
], VegaSignatureCaptureRenderer.prototype, "mode", void 0);
__decorate$3([
  MapToComponentField()
], VegaSignatureCaptureRenderer.prototype, "writtenModeRenderer", void 0);

const Icons = {
  signature: {
    icon: `<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M176 128c0-26.5 21.5-48 48-48s48 21.5 48 48v7.9c0 27.5-2.3 55-7 82.1L158 251.1c-36.9 11.4-62 45.5-62 84.1V410c0 38.6 31.3 70 70 70c24.6 0 47.4-12.9 60-34l15.9-26.4c29.6-49.4 51.1-103.3 63.6-159.5l1-4.7 110.8-34.3-23.9 66.8c-2.6 7.4-1.5 15.5 3 21.9s11.8 10.2 19.6 10.2H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H450.1l28.5-79.9c3.1-8.6 1-18.1-5.3-24.7s-15.7-9-24.4-6.3l-133 41.2c2.7-22 4.1-44.2 4.1-66.4V128c0-53-43-96-96-96s-96 43-96 96v40c0 13.3 10.7 24 24 24s24-10.7 24-24V128zm-3.8 169l80.9-25c-11.7 43.2-29.4 84.5-52.4 123l-15.9 26.4c-4 6.6-11.1 10.7-18.8 10.7c-12.1 0-22-9.8-22-22V335.2c0-17.5 11.4-33 28.2-38.2zM64 368H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64.2c-.1-2-.2-4-.2-6V368zm216.8 48H616c13.3 0 24-10.7 24-24s-10.7-24-24-24H304.1c-7 16.3-14.8 32.4-23.3 48z"/></svg>`,
  },
};

var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
class WrittenModeRenderer extends VegaSlimmer {
  constructor() {
    super(...arguments);
    /**
     * The below method is e2e-test covered in
     * @see{module:vega-signature-capture-focus-e2e}
     */
    /* istanbul ignore next */
    this.signatureCaptureFocus = () => {
      this.signatureCaptureContainerRef.focus();
    };
  }
  getSignatureCaptureContainer() {
    return this.signatureCaptureContainerRef;
  }
  render() {
    return (h("vega-flex", { direction: "col", gap: "size-8" },
      this.renderLabel(),
      this.renderContainer(),
      this.renderFooter()));
  }
  renderLabel() {
    return (this.label && (h("vega-field-label", { onClick: this.signatureCaptureFocus, isFieldRequired: this.required, label: this.label, disabled: this.disabled })));
  }
  renderContainer() {
    return (h("div", { class: {
        'signature-capture-written-container': true,
        'disabled': this.disabled,
      }, "aria-label": "Please sign here", role: "textbox", tabIndex: this.disabled ? -1 : 0, ref: (ref) => (this.signatureCaptureContainerRef = ref) },
      this.renderPlaceholder(),
      this.renderSignaturePad()));
  }
  renderPlaceholder() {
    if (this.isDrawing || this.value)
      return;
    return (this.placeholder && (h("vega-flex", { class: "placeholder-container", gap: "size-8", justifyContent: "center", alignItems: "center", margin: {
        left: 'size-24',
        right: 'size-24',
      } },
      this.placeholderIcon && (h("vega-icon", { class: "placeholder-container-icon", size: "size-20", color: "text-secondary", icon: this.placeholderIcon })),
      h("div", { class: "placeholder-container-content" }, this.translationSlimmer.t(this.placeholder)))));
  }
  /*
   * When the clear button is displayed, since the error message and the clear button are in the same line, this element is displayed.
   */
  renderSignaturePad() {
    // TODO: Adding the SVG attribute will cause changes to the generated base64 value, leading to problems. https://gethired.atlassian.net/browse/VD-7854
    return (h("svg", { width: "100%", height: formatAndValidResponsiveToken(this.height, 'widthAndHeight'), "touch-action": "none", ref: (ref) => this.writtenModeSvgController.setSignatureContainerRef(ref) }));
  }
  renderFooter() {
    return (this.showClearBtn && (h("vega-flex", { class: "signature-capture-written-footer", justifyContent: "space-between" },
      h("div", { class: "vega-error vega-hidden vega-error-content" }),
      this.renderClearBtn())));
  }
  renderClearBtn() {
    return (h("div", { class: "clear-button" },
      h("vega-button-link", { size: "small", disabled: this.disabled, ref: (ref) => {
          DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaClick, () => {
            this.writtenModeSvgController.clear();
          });
        }, label: this.translationSlimmer.t('Clear Signature') })));
  }
}
(() => {
  VegaInternalIconManager.register(Icons);
})();
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "label", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "required", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "showClearBtn", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "placeholder", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "placeholderIcon", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "disabled", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "value", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "isDrawing", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "height", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "writtenModeSvgController", void 0);
__decorate$2([
  MapToComponentField()
], WrittenModeRenderer.prototype, "translationSlimmer", void 0);

var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
/**
 * Signature written mode controller
 */
class WrittenModeSvgController extends VegaSlimmer {
  constructor() {
    super(...arguments);
    this.penWidth = '4px';
    /**
     * Clear the signature
     */
    this.clear = () => {
      this.signatureContainerRef.innerHTML = htmlSanitizer.sanitize('', emptySanitizeStrategy);
      this.value = null;
    };
    /*
     * The below method is e2e-test covered in
     * @see{module:vega-signature-capture-on-draw-signature}
     */
    /* istanbul ignore next */
    /**
     * Start drawing the current path
     *
     * @param {MouseEvent} e - MouseEvent
     */
    this.startDrawing = (e) => {
      if (this.disabled)
        return;
      this.isDrawing = true;
      const { x, y } = this.getPoint(e);
      // eslint-disable-next-line no-restricted-globals
      this.currentPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
      this.currentPath.setAttribute('d', `M ${x} ${y}`);
      this.currentPath.setAttribute('stroke', 'rgba(4, 4, 28, 1)');
      this.currentPath.setAttribute('stroke-width', this.penWidth);
      this.currentPath.setAttribute('fill', 'none');
      this.currentPath.setAttribute('stroke-linecap', 'round');
      this.currentPath.setAttribute('stroke-linejoin', 'round');
      this.signatureContainerRef.appendChild(this.currentPath);
    };
    /*
     * The below method is e2e-test covered in
     * @see{module:vega-signature-capture-on-draw-signature}
     */
    /* istanbul ignore next */
    /**
     * Get the current mouse position.
     * In cypress case, when the mousedown event signature is triggered, the event type is 'Event', which adds compatibility
     *
     * @param {MouseEvent | TouchEvent} e - MouseEvent on desktop or TouchEvent on mobile
     * @returns {VegaSignatureMousePosition} - Current mouse position
     */
    this.getPoint = (e) => {
      var _a, _b;
      const rect = this.signatureContainerRef.getBoundingClientRect();
      const clientX = (_a = e['clientX']) !== null && _a !== void 0 ? _a : e['touches'][0].clientX;
      const clientY = (_b = e['clientY']) !== null && _b !== void 0 ? _b : e['touches'][0].clientY;
      return {
        x: clientX - rect.left,
        y: clientY - rect.top,
      };
    };
    /*
     * The below method is e2e-test covered in
     * @see{module:vega-signature-capture-on-draw-signature}
     */
    /* istanbul ignore next */
    /**
     * Draw the current path to the end point
     *
     * @param {MouseEvent} e - Mouse event
     */
    this.draw = (e) => {
      if (!this.isDrawing)
        return;
      const { x, y } = this.getPoint(e);
      const d = this.currentPath.getAttribute('d');
      this.currentPath.setAttribute('d', `${d} L ${x} ${y}`);
    };
    /*
     * The below method is e2e-test covered in
     * @see{module:vega-signature-capture-on-draw-signature}
     */
    /* istanbul ignore next */
    /**
     * Stop drawing and update the value
     */
    this.stopDrawing = () => {
      if (!this.isDrawing)
        return;
      this.isDrawing = false;
      this.value = { type: 'written', img: this.generateSignatureImage() };
    };
  }
  /**
   * Setup written listeners
   */
  componentDidLoad() {
    this.setupListeners();
    this.fillSignature(this.value);
  }
  /**
   * Clear the signature
   */
  handleClear() {
    this.clear();
  }
  /**
   * Emit the vegaChange event when value changed
   *
   * @param {VegaSignatureValue} newValue - The `newValue` parameter is a object representing the new value for the signature capture.
   * @param {VegaSignatureValue} oldValue - The `oldValue` parameter is a object representing the old value for the signature capture.
   */
  watchValue(newValue, oldValue) {
    if (deepEqual(newValue, oldValue))
      return;
    this.changeEventEmitter.emit(newValue);
    this.fillSignature(newValue);
    ChangeManager.notify(FORM_ELEMENT_VALUE_CHANGE, {
      host: this.host,
      detail: newValue,
    });
  }
  /**
   * Set the signature container ref
   *
   * @param {SVGElement} ref - signature container ref
   */
  setSignatureContainerRef(ref) {
    this.signatureContainerRef = ref;
  }
  /**
   * Setup the listeners, for desktop and mobile
   */
  setupListeners() {
    const container = this.signatureContainerRef;
    container.addEventListener('mousedown', this.startDrawing);
    container.addEventListener('mousemove', this.draw);
    container.addEventListener('mouseup', this.stopDrawing);
    container.addEventListener('mouseleave', this.stopDrawing);
    // For mobile
    container.addEventListener('touchstart', this.startDrawing);
    container.addEventListener('touchmove', this.draw);
    container.addEventListener('touchend', this.stopDrawing);
  }
  /*
   * The below method is e2e-test covered in
   * @see{module:vega-signature-capture-on-draw-signature}
   */
  /* istanbul ignore next */
  /**
   * Generate the signature base64 image string
   *
   * @returns {string} - base64 image string
   */
  generateSignatureImage() {
    const serializer = new XMLSerializer();
    // TODO: Adding the SVG attribute will cause changes to the generated base64 value, leading to problems. https://gethired.atlassian.net/browse/VD-7854
    const svgData = serializer.serializeToString(this.signatureContainerRef);
    const base64Svg = btoa(unescape(encodeURIComponent(svgData)));
    return `data:image/svg+xml;base64,${base64Svg}`;
  }
  /**
   * Parse the value to svg
   *
   * @param {VegaSignatureValue} value - Signature value
   * @returns {Nullable<HTMLElement>} - SVG element
   */
  fromDataURL(value) {
    if (!value || !value.img)
      return;
    const base64Svg = this.value.img.replace('data:image/svg+xml;base64,', '');
    return new DOMParser().parseFromString(atob(base64Svg), 'image/svg+xml').documentElement;
  }
  /**
   * Fill the signature from the value.
   * Not fill the signature if the signature container already has child nodes, that means in written status.
   *
   * @param {VegaSignatureValue} value - Signature value
   */
  fillSignature(value) {
    this.signatureContainerRef.replaceChildren();
    const signature = this.fromDataURL(value);
    if (signature) {
      const paths = Array.from(signature.childNodes);
      this.signatureContainerRef.append(...paths);
    }
  }
}
__decorate$1([
  MapToComponentField()
], WrittenModeSvgController.prototype, "changeEventEmitter", void 0);
__decorate$1([
  MapToComponentField()
], WrittenModeSvgController.prototype, "host", void 0);
__decorate$1([
  MapToComponentField({ writable: true })
], WrittenModeSvgController.prototype, "value", void 0);
__decorate$1([
  MapToComponentField({ writable: true })
], WrittenModeSvgController.prototype, "isDrawing", void 0);
__decorate$1([
  MapToComponentField()
], WrittenModeSvgController.prototype, "disabled", void 0);
__decorate$1([
  MapToComponentMethod('componentDidLoad')
], WrittenModeSvgController.prototype, "componentDidLoad", null);
__decorate$1([
  MapToComponentMethod('clear')
], WrittenModeSvgController.prototype, "handleClear", null);
__decorate$1([
  MapToComponentMethod('watchValue')
], WrittenModeSvgController.prototype, "watchValue", null);

const vegaSignatureCaptureCss = ":host{display:block}.signature-capture-written-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;overflow:hidden;width:100%;position:relative;background-color:rgb(252, 252, 252)}.signature-capture-written-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.signature-capture-written-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.signature-capture-written-container .placeholder-container{height:100%;position:absolute;top:0px;right:0px;bottom:0px;left:0px;pointer-events:none}.signature-capture-written-container .placeholder-container-content{font-family:\"Inter\", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;color:rgba(4, 4, 28, 0.64)}@media screen and (min-width: 768px) and (max-width: 1023px){.signature-capture-written-container .placeholder-container-content{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.signature-capture-written-container .placeholder-container-content{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.signature-capture-written-container .placeholder-container-content{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.signature-capture-written-container .placeholder-container-icon{flex-shrink:0;color:rgba(4, 4, 28, 0.64)}.signature-capture-written-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.signature-capture-written-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.signature-capture-written-container.error:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}.signature-capture-written-container.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.signature-capture-written-container.disabled:hover,.signature-capture-written-container.disabled:focus-within{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.signature-capture-written-container.disabled:focus-within{outline:none}.signature-capture-written-container.disabled .placeholder-container-content,.signature-capture-written-container.disabled .placeholder-container-icon{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.signature-capture-written-footer .clear-button{flex-grow:1;padding-right:8px;text-align:right}.signature-capture-written-footer .vega-error-content{padding-top:0px;padding-right:0px;flex-grow:1}.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}";

var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
    r = Reflect.decorate(decorators, target, key, desc);
  else
    for (var i = decorators.length - 1; i >= 0; i--)
      if (d = decorators[i])
        r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
const VegaSignatureCapture = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.vegaChange = createEvent(this, "vegaChange", 7);
    this.change = createEvent(this, "change", 7);
    this.globalSlimmers = {};
    this.translationSlimmer = new TranslationSlimmer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.vegaSignatureCaptureRenderer = new VegaSignatureCaptureRenderer();
    this.writtenModeRenderer = new WrittenModeRenderer();
    this.writtenModeSvgController = new WrittenModeSvgController();
    this.changeEventEmitter = createEventEmitSlimmer(VegaSignatureCapture, VegaChange);
    this.formFieldController = new FormFieldControllerSlimmer({
      propertyRules: [
        {
          propertyName: 'required',
          ruleFactory: (isRequired) => (isRequired ? new RequiredFieldRule() : null),
        },
      ],
      validationRulesName: 'validationRules',
      defaultValue: null,
      attributeGetter: (propertyName) => this[propertyName],
      inputContainerGetter: () => this.writtenModeRenderer.getSignatureCaptureContainer(),
      touchableAreaGetter: () => [this.writtenModeRenderer.getSignatureCaptureContainer()],
    });
    this.pageResizeSlimmer = new PageResizeObserverSlimmer();
    this.currentBreakpoint = getCurrentBreakpoint();
    /**
     * Specifies the state of the signature
     */
    this.isDrawing = false;
    /**
     * Specifies the mode of the signature capture
     *
     * @vegaVersion 2.19.0
     */
    this.mode = 'written';
    /**
     * Specifies the label or title for the signature capture.
     *
     * It provides descriptive text that helps identify the
     *    purpose or content expected in the signature capture.
     *
     * @vegaVersion 2.19.0
     */
    this.label = '';
    /**
     * Determines whether the signature capture field is required.
     *
     * @vegaVersion 2.19.0
     */
    this.required = false;
    /**
     * Determines whether the clear button is displayed.
     *
     * @vegaVersion 2.19.0
     */
    this.showClearBtn = true;
    /**
     * Specifies a placeholder string that displays as a temporary hint
     *    or example inside the signature capture.
     *
     * It indicates the expected format or pattern of the signature capture.
     *
     * @vegaVersion 2.19.0
     */
    this.placeholder = 'Please sign here';
    /**
     * Specifies an icon or symbol that appears before the placeholder,
     *    providing visual context or enhancing the aesthetic appearance
     *    of the signature capture.
     *
     * @vegaVersion 2.19.0
     * @defaultValue v-internal-icon signature
     */
    this.placeholderIcon = VegaInternalIconManager.getIconKey('signature');
    /**
     * Specifies whether the signature capture is disabled.
     *
     * @vegaVersion 2.19.0
     */
    this.disabled = false;
    /**
     * Specifies the value of the signature capture
     *
     * @vegaVersion 2.19.0
     */
    /* eslint-disable-next-line @stencil/strict-mutable */
    this.value = null;
    /**
     * Indicates whether the current value in the field is considered valid or
     *    invalid based on the defined validation rules.
     *
     * @vegaVersion 2.19.0
     */
    /* eslint-disable-next-line @stencil/strict-mutable */
    this.isValid = null;
    /**
     * Determines whether the signature capture field should undergo automatic validation
     *    during the user's sign.
     *
     * @vegaVersion 2.19.0
     */
    this.autoValidation = true;
    /**
     * Defines custom validation rules for the signature capture field.
     *
     * @vegaVersion 2.19.0
     */
    this.validationRules = [];
    /**
     * Defines the height of the signature capture field.
     *
     * @vegaVersion 2.20.0
     */
    this.height = '320px';
  }
  watchValue(newValue, oldValue) {
  }
  watchValidationRules() {
  }
  /**
   * Invoke this method to clear the signature
   *
   * @vegaVersion 2.19.0
   */
  async clear() {
  }
  render() {
    return sanitizeVegaComponent(this.vegaSignatureCaptureRenderer.render(), this.host);
  }
  get host() { return getElement(this); }
  static get watchers() { return {
    "value": ["watchValue"],
    "validationRules": ["watchValidationRules"]
  }; }
};
__decorate([
  InjectVegaGlobalSlimmer()
], VegaSignatureCapture.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "translationSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "vegaSignatureCaptureRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "writtenModeRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "writtenModeSvgController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "changeEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "formFieldController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaSignatureCapture.prototype, "pageResizeSlimmer", void 0);
VegaSignatureCapture.style = vegaSignatureCaptureCss;

export { VegaSignatureCapture as vega_signature_capture };
