{"version":3,"file":"variations.mjs","names":[],"sources":["../../src/post-navigation-link/variations.js"],"sourcesContent":["import { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\n\nconst variations = [\n\t{\n\t\tname: 'post-previous',\n\t\ttitle: __( 'Previous Post' ),\n\t\tdescription: __(\n\t\t\t'Displays the post link that precedes the current post.'\n\t\t),\n\t\ticon: previous,\n\t\tattributes: { type: 'previous' },\n\t\tscope: [ 'inserter', 'transform' ],\n\t\texample: {\n\t\t\tattributes: {\n\t\t\t\tlabel: __( 'Previous post' ),\n\t\t\t\tarrow: 'arrow',\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tisDefault: true,\n\t\tname: 'post-next',\n\t\ttitle: __( 'Next Post' ),\n\t\tdescription: __(\n\t\t\t'Displays the post link that follows the current post.'\n\t\t),\n\t\ticon: next,\n\t\tattributes: { type: 'next' },\n\t\tscope: [ 'inserter', 'transform' ],\n\t\texample: {\n\t\t\tattributes: {\n\t\t\t\tlabel: __( 'Next post' ),\n\t\t\t\tarrow: 'arrow',\n\t\t\t},\n\t\t},\n\t},\n];\n\n/**\n * Add `isActive` function to all `post-navigation-link` variations, if not defined.\n * `isActive` function is used to find a variation match from a created\n *  Block by providing its attributes.\n */\nvariations.forEach( ( variation ) => {\n\tif ( variation.isActive ) {\n\t\treturn;\n\t}\n\tvariation.isActive = ( blockAttributes, variationAttributes ) =>\n\t\tblockAttributes.type === variationAttributes.type;\n} );\n\nexport default variations;\n"],"mappings":";;;AAGA,MAAM,aAAa,CAClB;CACC,MAAM;CACN,OAAO,GAAI,eAAgB;CAC3B,aAAa,GACZ,wDACD;CACA,MAAM;CACN,YAAY,EAAE,MAAM,WAAW;CAC/B,OAAO,CAAE,YAAY,WAAY;CACjC,SAAS,EACR,YAAY;EACX,OAAO,GAAI,eAAgB;EAC3B,OAAO;CACR,EACD;AACD,GACA;CACC,WAAW;CACX,MAAM;CACN,OAAO,GAAI,WAAY;CACvB,aAAa,GACZ,uDACD;CACA,MAAM;CACN,YAAY,EAAE,MAAM,OAAO;CAC3B,OAAO,CAAE,YAAY,WAAY;CACjC,SAAS,EACR,YAAY;EACX,OAAO,GAAI,WAAY;EACvB,OAAO;CACR,EACD;AACD,CACD;;;;;;AAOA,WAAW,SAAW,cAAe;CACpC,IAAK,UAAU,UACd;CAED,UAAU,YAAa,iBAAiB,wBACvC,gBAAgB,SAAS,oBAAoB;AAC/C,CAAE"}