import { getLimitItemsHeightPerPage } from '../../core/urils/common-functions' ; import { apiGetAllMessages } from './messages.constant' ; import { MessageModel } from './messages.model' ; export namespace MessagesActions { export class FetchMessages { static readonly type = '[Messages Tab] Fetch messages' ; constructor ( public search , public page , public itemHeight = 66 , public isRefresh = false , public api = apiGetAllMessages ( ) ) { this . api = apiGetAllMessages ( this . search , this . page , getLimitItemsHeightPerPage ( this . itemHeight ) ) ; } } export class FetchMessagesSuccess { static readonly type = '[Messages Tab] Fetch messages success' ; constructor ( public listData , public page ) { } } export class FetchMessagesFail { static readonly type = '[Messages Tab] Fetch messages fail' ; constructor ( public error ) { } } } export class PinMessage { static readonly type = '[Messages Tab] Pin messages' ; constructor ( public id ) { } } export class UnPinMessage { static readonly type = '[Messages Tab] UnPin messages' ; constructor ( public id ) { } }