// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'stroke_model.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_$EditorPointImpl _$$EditorPointImplFromJson(Map<String, dynamic> json) =>
    _$EditorPointImpl(
      x: (json['x'] as num).toDouble(),
      y: (json['y'] as num).toDouble(),
      pressure: (json['pressure'] as num?)?.toDouble(),
      tilt: (json['tilt'] as num?)?.toDouble(),
      timestamp: (json['timestamp'] as num?)?.toInt(),
      pointerDeviceKind: $enumDecodeNullable(
        _$InputDeviceKindEnumMap,
        json['pointerDeviceKind'],
      ),
    );

Map<String, dynamic> _$$EditorPointImplToJson(_$EditorPointImpl instance) =>
    <String, dynamic>{
      'x': instance.x,
      'y': instance.y,
      'pressure': instance.pressure,
      'tilt': instance.tilt,
      'timestamp': instance.timestamp,
      'pointerDeviceKind': _$InputDeviceKindEnumMap[instance.pointerDeviceKind],
    };

const _$InputDeviceKindEnumMap = {
  InputDeviceKind.touch: 'touch',
  InputDeviceKind.mouse: 'mouse',
  InputDeviceKind.stylus: 'stylus',
  InputDeviceKind.invertedStylus: 'invertedStylus',
  InputDeviceKind.trackpad: 'trackpad',
  InputDeviceKind.unknown: 'unknown',
};

_$EditorStrokeImpl _$$EditorStrokeImplFromJson(Map<String, dynamic> json) =>
    _$EditorStrokeImpl(
      id: json['id'] as String,
      points: (json['points'] as List<dynamic>)
          .map((e) => EditorPoint.fromJson(e as Map<String, dynamic>))
          .toList(),
      tool:
          $enumDecodeNullable(_$EditorToolEnumMap, json['tool']) ??
          EditorTool.pen,
      color: (json['color'] as num?)?.toInt() ?? 0xFF000000,
      width: (json['width'] as num?)?.toDouble() ?? 0.003,
      filled: json['filled'] as bool? ?? false,
      textContent: json['textContent'] as String?,
      fontSize: (json['fontSize'] as num?)?.toDouble() ?? 14.0,
    );

Map<String, dynamic> _$$EditorStrokeImplToJson(_$EditorStrokeImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'points': instance.points,
      'tool': _$EditorToolEnumMap[instance.tool]!,
      'color': instance.color,
      'width': instance.width,
      'filled': instance.filled,
      'textContent': instance.textContent,
      'fontSize': instance.fontSize,
    };

const _$EditorToolEnumMap = {
  EditorTool.pen: 'pen',
  EditorTool.highlighter: 'highlighter',
  EditorTool.eraser: 'eraser',
};
