---
to: <%- route -%>.extension.ts
---
import { extensions } from '@wix/astro/builders';

export default extensions.editorReactComponent({
  id: '<%- config.id -%>',
  description: '<%- config.name -%>',
  type: '<%- config.type -%>',
  editorElement: {
    displayName: '<%- config.name -%>',
    selector:  '<%- config.selector -%>',
    data: {
      step: {
        dataType: 'number',
        defaultValue: 10,
        displayName: 'Increment step',
        number: { min: '1' },
      },
      showLabel: {
        dataType: 'booleanValue',
        defaultValue: true,
        displayName: 'Show label',
      },
      label: {
        dataType: 'text',
        defaultValue: 'Count',
        displayName: 'Counter label',
        text: {},
      },
    }
  },
  resources: {
    client: {
      componentUrl:  '<%- config.component -%>',
    }
  }
});
