import type { Meta, StoryObj } from '@storybook/angular';

import { pyReviewRaw } from './mock';

import {{! pick new delimiters for mustache }}{{=<% %>=}}{<%={{ }}=%> {{COMPONENT_CLASS_NAME}}Component {{=<% %>=}}}<%={{ }}=%>{{! revert delimiters for mustache }} from './{{COMPONENT_CLASS_NAME_KEBAB}}.component';

const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
  title: '{{COMPONENT_CLASS_NAME}}',
  component: {{COMPONENT_CLASS_NAME}}Component,
  excludeStories: /.*Data$/,
  render: args => ({
    props: {
      ...args,
      pConn$: {
        resolveConfigProps: () => ({
          label: 'Details',
          showLabel: true,
          showHighlightedData: false
        }),
        getRawMetadata: () => {
          return pyReviewRaw.config;
        },
        getChildren: () => {
          return pyReviewRaw.children;
        },
        isEditable: () => true,
        setAction: () => {
          /* nothing */
        },
        getActions: () => {
          return {
            onChange: () => {},
            onBlur: () => {}
          };
        },
        populateAdditionalProps: () => {
          /* nothing */
        },
        getConfigProps: () => pyReviewRaw.config,
        getInheritedProps: () => ({}),
        setInheritedProp: () => {
          /* nothing */
        },
        getContextName: () => ''
      } as any
    }
  })
};

export default meta;
type Story = StoryObj<{{COMPONENT_CLASS_NAME}}Component>;

export const {{COMPONENT_CLASS_NAME}}: Story = {
  args: {
    showHighlightedData: false
  }
};
