{"version":3,"file":"state.mjs","names":[],"sources":["../../../src/input-control/reducer/state.ts"],"sourcesContent":["import type { Reducer, SyntheticEvent } from 'react';\nimport type { Action, InputAction } from './actions';\n\nexport interface InputState {\n\t_event?: SyntheticEvent;\n\terror: unknown;\n\tinitialValue?: string;\n\tisDirty: boolean;\n\tisDragEnabled: boolean;\n\tisDragging: boolean;\n\tisPressEnterToChange: boolean;\n\tvalue?: string;\n}\n\nexport type StateReducer< SpecializedAction = {} > = Reducer<\n\tInputState,\n\tSpecializedAction extends Action\n\t\t? InputAction | SpecializedAction\n\t\t: InputAction\n>;\n\nexport const initialStateReducer: StateReducer = ( state: InputState ) => state;\n\nexport const initialInputControlState: InputState = {\n\terror: null,\n\tinitialValue: '',\n\tisDirty: false,\n\tisDragEnabled: false,\n\tisDragging: false,\n\tisPressEnterToChange: false,\n\tvalue: '',\n};\n"],"mappings":";AAqBA,MAAa,uBAAsC,UAAuB;AAE1E,MAAa,2BAAuC;CACnD,OAAO;CACP,cAAc;CACd,SAAS;CACT,eAAe;CACf,YAAY;CACZ,sBAAsB;CACtB,OAAO;AACR"}