import { createAction, props } from '@ngrx/store';

import {
  RegViewRequest,
  RegViewResponse,
  RegUpdateRequest,
  RegUpdateResponse
} from '@ucap-webmessenger/protocol-option';

export const regView = createAction(
  '[Messenger::Option] RegView',
  props<RegViewRequest>()
);

export const regViewSuccess = createAction(
  '[Messenger::Option] RegView Success',
  props<{ res: RegViewResponse }>()
);

export const regViewFailure = createAction(
  '[Messenger::Option] RegView Failure',
  props<{ error: any }>()
);

export const regUpdate = createAction(
  '[Messenger::Option] RegUpdate',
  props<RegUpdateRequest>()
);

export const regUpdateSuccess = createAction(
  '[Messenger::Option] RegUpdate Success',
  props<{ res: RegUpdateResponse }>()
);

export const regUpdateFailure = createAction(
  '[Messenger::Option] RegUpdate Failure',
  props<{ error: any }>()
);
