<commit_before>import { storiesOf } from '@storybook/html';
import { withHits } from '../.storybook/decorators';
import smartSort from '../src/widgets/smart-sort/smart-sort';

const searchOptions = {
  appId: 'C7RIRJRYR9',
  apiKey: '<KEY>',
  indexName: 'test_Bestbuy_vr_price_asc',
};

storiesOf('Sorting/SmartSort', module)
  .add(
    'default',
    withHits(({ search, container }) => {
      search.addWidgets([
        smartSort({
          container,
          cssClasses: {
            root: 'my-SmartSort',
          },
        }),
      ]);
    }, searchOptions)
  )
  .add(
    'explicit value',
    withHits(({ search, container }) => {
      search.addWidgets([
        smartSort({
          container,
          templates: {
            button: ({ isSmartSorted }) =>
              isSmartSorted ? 'See all results' : 'See relevant results',
          },
        }),
      ]);
    }, searchOptions)
  );<commit_msg>chore(storybook): remove unused SmartSort story (#4661)<commit_after>import { storiesOf } from '@storybook/html';
import { withHits } from '../.storybook/decorators';
import smartSort from '../src/widgets/smart-sort/smart-sort';

const searchOptions = {
  appId: 'C7RIRJRYR9',
  apiKey: '<KEY>',
  indexName: 'test_Bestbuy_vr_price_asc',
};

storiesOf('Sorting/SmartSort', module).add(
  'default',
  withHits(({ search, container }) => {
    search.addWidgets([
      smartSort({
        container,
        cssClasses: {
          root: 'my-SmartSort',
        },
      }),
    ]);
  }, searchOptions)
);
{'fraction_non_alphanumeric': 0.15895765472312703, 'fraction_numerical': 0.005211726384364821, 'mean_word_length': 2.51487414187643, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '751160', 'n_tokens_mistral': 502, 'n_tokens_neox': 487, 'n_words': 92}