import 'package:pshared/data/dto/permissions/action_effect.dart';
import 'package:pshared/models/permissions/action_effect.dart';
import 'package:pshared/models/permissions/action.dart';
import 'package:pshared/models/permissions/effect.dart';


extension ActionEffectMapper on ActionEffect {
  ActionEffectDTO toDTO() {
    return ActionEffectDTO(
      action: action.toShortString(), 
      effect: effect.toShortString(), 
    );
  }
}

extension ActionEffectDTOMapper on ActionEffectDTO {
  ActionEffect toDomain() {
    return ActionEffect(
      action: ActionExtension.fromString(action),
      effect: EffectExtension.fromString(effect),
    );
  }
}
