---
to: <%- config.kebabCaseName -%>.extension.ts
---
import { extensions } from '@wix/astro/builders';
import { LAYOUT } from '@wix/react-component-schema';
import { withEditorElementDefaults } from '@wix/react-component-utils';
import { editorElement } from './<%- config.kebabCaseName -%>.generated';
import { defaultProps } from './<%- config.kebabCaseName -%>';
import componentUrl from './component.tsx?url';

export default extensions.editorReactComponent({
  id: '<%- config.id -%>',
  type: '<%- config.type -%>',
  displayName: '<%- config.name -%>',
  description: '<%- config.description -%>',
  editorElement: withEditorElementDefaults({
    ...editorElement,
    layout: {
      resizeDirection: LAYOUT.RESIZE_DIRECTION.horizontalAndVertical,
      contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.vertical,
    },
  }, defaultProps),
  installation: {
    initialSize: {
      width: {
        sizingType: LAYOUT.SIZING_TYPE.pixels,
        pixels: 250,
      },
      height: {
        sizingType: LAYOUT.SIZING_TYPE.content,
      },
    },
  },
  resources: {
    client: {
      componentUrl,
    },
  },
});
