import { CommonModule } from '@angular/common'; import { HttpClientModule } from '@angular/common/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; // Third-party modules import { AngularSvgIconModule } from 'angular-svg-icon'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular'; // Components import { CaCommentsComponent } from './ca-comments.component'; const meta: Meta = { title: 'Example/Comments', component: CaCommentsComponent, parameters: { layout: 'centered', }, decorators: [ moduleMetadata({ imports: [ CommonModule, FormsModule, ReactiveFormsModule, BrowserAnimationsModule, AngularSvgIconModule.forRoot(), HttpClientModule, NgbModule, ], providers: [], }), ], tags: ['autodocs'], argTypes: {}, args: {}, } as Meta; export default meta; type Story = StoryObj; export const ToolbarDropdownStory: Story = { args: { isDarkmode: false, comments: [ { id: 1, companyUser: { id: 101, userId: 201, fullName: 'Alice Johnson', avatarFile: { fileId: 301, url: 'https://example.com/avatar1.jpg', fileName: 'avatar1.jpg', }, departmentId: 1, }, commentContent: 'This is a great tool for team collaboration! This is a great tool for team collaboration! This is a great tool for team collaboration!', isEdited: false, upRatingCount: 5, downRatingCount: 0, currentCompanyUserRating: 1, isDriver: false, createdAt: new Date('2025-04-10T10:30:00Z').toISOString(), }, { id: 2, companyUser: { id: 102, userId: 202, fullName: 'Bob Smith', avatarFile: { fileId: 302, url: 'https://example.com/avatar2.jpg', fileName: 'avatar2.jpg', }, departmentId: 2, }, commentContent: 'Needs a bit of improvement on mobile layout.', isEdited: true, upRatingCount: 2, downRatingCount: 1, currentCompanyUserRating: -1, isDriver: true, createdAt: new Date('2025-04-11T08:15:00Z').toISOString(), updatedAt: new Date('2025-04-12T09:00:00Z').toISOString(), }, { id: 3, companyUser: { id: 9, userId: 9, fullName: 'Gaser Gasovic', avatarFile: { fileId: 303, url: 'https://s3.rute.co:9000/devcarriera/User avatar/37/9/9c14dff2-fed4-44a0-88ca-0a1a2da7541b-userAvatar.png', fileName: 'avatar3.png', }, departmentId: 1, }, commentContent: 'I love how intuitive the interface is.', isEdited: false, upRatingCount: 10, currentCompanyUserRating: 1, isDriver: false, createdAt: new Date('2025-04-15T12:00:00Z').toISOString(), }, { id: 4, companyUser: { id: 101, userId: 201, fullName: 'Alice Johnson', avatarFile: { fileId: 301, url: 'https://example.com/avatar1.jpg', fileName: 'avatar1.jpg', }, departmentId: 1, }, commentContent: 'This is a great tool for team collaboration! This is a great tool for team collaboration! This is a great tool for team collaboration!', isEdited: false, upRatingCount: 5, downRatingCount: 0, currentCompanyUserRating: 1, isDriver: false, createdAt: new Date('2025-04-10T10:30:00Z').toISOString(), }, ], commentCount: 3, currentUser: { companyUserId: 9, userId: 9, firstName: 'Gaser', lastName: 'Gaserović', avatarFile: { fileId: 1779, fileName: 'userAvatar.png', url: 'https://s3.rute.co:9000/devcarriera/User avatar/37/9/9c14dff2-fed4-44a0-88ca-0a1a2da7541b-userAvatar.png', fileSize: 326788, tags: null, tagGeneratedByUser: false, updatedAt: null, }, }, }, };