import type { Meta, StoryObj } from '@storybook/angular';
import { children } 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$: {
        getChildren: () => {
          return [
            {
              getPConnect: () => {
                return {
                  getComponentName: () => {
                    return 'Region';
                  },
                  getChildren: () => {
                    return children;
                  }
                };
              }
            }
          ];
        },
        getConfigProps: () => {
          return {
            title: 'Announcements',
            operator: ''
          };
        },
        resolveConfigProps: () => {
          return {
            title: 'Announcements',
            operator: ''
          };
        },
        getContextName: () => ''
      } as any
    }
  })
};

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

export const {{COMPONENT_CLASS_NAME}}: Story = {
  args: {
    title$: 'Announcements'
  }
};
