{"version":3,"file":"offset-controls.mjs","names":["NumberControl"],"sources":["../../../../src/query/edit/inspector-controls/offset-controls.jsx"],"sourcesContent":["import { __experimentalNumberControl as NumberControl } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\n\nconst MIN_OFFSET = 0;\nconst MAX_OFFSET = 100;\n\nexport const OffsetControl = ( { offset = 0, onChange } ) => {\n\treturn (\n\t\t<NumberControl\n\t\t\tlabel={ _x( 'Offset', 'Number of posts to skip in a query' ) }\n\t\t\tvalue={ offset }\n\t\t\tmin={ MIN_OFFSET }\n\t\t\tonChange={ ( newOffset ) => {\n\t\t\t\tif (\n\t\t\t\t\tisNaN( newOffset ) ||\n\t\t\t\t\tnewOffset < MIN_OFFSET ||\n\t\t\t\t\tnewOffset > MAX_OFFSET\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tonChange( { offset: newOffset } );\n\t\t\t} }\n\t\t/>\n\t);\n};\n\nexport default OffsetControl;\n"],"mappings":";;;;AAGA,MAAM,aAAa;AACnB,MAAM,aAAa;AAEnB,MAAa,iBAAkB,EAAE,SAAS,GAAG,eAAgB;CAC5D,OACC,oBAACA,6BAAD;EACC,OAAQ,GAAI,UAAU,oCAAqC;EAC3D,OAAQ;EACR,KAAM;EACN,WAAa,cAAe;GAC3B,IACC,MAAO,SAAU,KACjB,YAAY,cACZ,YAAY,YAEZ;GAED,SAAU,EAAE,QAAQ,UAAU,CAAE;EACjC;CACA,CAAA;AAEH"}