{"version":3,"file":"clear-list-state.mjs","names":[],"sources":["../../src/lists/clear-list-state.ts"],"sourcesContent":["export function clearListState<T extends Record<PropertyKey, any>>(\n  field: PropertyKey,\n  state: T\n): T {\n  if (state === null || typeof state !== 'object') {\n    return {} as T;\n  }\n\n  const clone = { ...state };\n  Object.keys(state).forEach((errorKey) => {\n    if (errorKey.includes(`${String(field)}.`)) {\n      delete clone[errorKey];\n    }\n  });\n\n  return clone;\n}\n"],"mappings":";;AAAA,SAAgB,eACd,OACA,OACG;CACH,IAAI,UAAU,QAAQ,OAAO,UAAU,UACrC,OAAO,CAAC;CAGV,MAAM,QAAQ,EAAE,GAAG,MAAM;CACzB,OAAO,KAAK,KAAK,EAAE,SAAS,aAAa;EACvC,IAAI,SAAS,SAAS,GAAG,OAAO,KAAK,EAAE,EAAE,GACvC,OAAO,MAAM;CAEjB,CAAC;CAED,OAAO;AACT"}