import React from 'react';
import Svg, { Path } from 'react-native-svg';

interface StoresIconProps {
  focused: boolean;
  size: number;
  color: string;
}

const StoresIcon: React.FC<StoresIconProps> = ({ focused, size, color }) => {
  if (focused) {
    // Selected state SVG (filled squares)
    return (
      <Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
        <Path d="M4 7C4 6.06812 4 5.60218 4.15224 5.23463C4.35523 4.74458 4.74458 4.35523 5.23463 4.15224C5.60218 4 6.06812 4 7 4C7.93188 4 8.39782 4 8.76537 4.15224C9.25542 4.35523 9.64477 4.74458 9.84776 5.23463C10 5.60218 10 6.06812 10 7C10 7.93188 10 8.39782 9.84776 8.76537C9.64477 9.25542 9.25542 9.64477 8.76537 9.84776C8.39782 10 7.93188 10 7 10C6.06812 10 5.60218 10 5.23463 9.84776C4.74458 9.64477 4.35523 9.25542 4.15224 8.76537C4 8.39782 4 7.93188 4 7Z" fill={color}/>
        <Path d="M14 7C14 6.06812 14 5.60218 14.1522 5.23463C14.3552 4.74458 14.7446 4.35523 15.2346 4.15224C15.6022 4 16.0681 4 17 4C17.9319 4 18.3978 4 18.7654 4.15224C19.2554 4.35523 19.6448 4.74458 19.8478 5.23463C20 5.60218 20 6.06812 20 7C20 7.93188 20 8.39782 19.8478 8.76537C19.6448 9.25542 19.2554 9.64477 18.7654 9.84776C18.3978 10 17.9319 10 17 10C16.0681 10 15.6022 10 15.2346 9.84776C14.7446 9.64477 14.3552 9.25542 14.1522 8.76537C14 8.39782 14 7.93188 14 7Z" fill={color}/>
        <Path d="M4 17C4 16.0681 4 15.6022 4.15224 15.2346C4.35523 14.7446 4.74458 14.3552 5.23463 14.1522C5.60218 14 6.06812 14 7 14C7.93188 14 8.39782 14 8.76537 14.1522C9.25542 14.3552 9.64477 14.7446 9.84776 15.2346C10 15.6022 10 16.0681 10 17C10 17.9319 10 18.3978 9.84776 18.7654C9.64477 19.2554 9.25542 19.6448 8.76537 19.8478C8.39782 20 7.93188 20 7 20C6.06812 20 5.60218 20 5.23463 19.8478C4.74458 19.6448 4.35523 19.2554 4.15224 18.7654C4 18.3978 4 17.9319 4 17Z" fill={color}/>
        <Path d="M14 17C14 16.0681 14 15.6022 14.1522 15.2346C14.3552 14.7446 14.7446 14.3552 15.2346 14.1522C15.6022 14 16.0681 14 17 14C17.9319 14 18.3978 14 18.7654 14.1522C19.2554 14.3552 19.6448 14.7446 19.8478 15.2346C20 15.6022 20 16.0681 20 17C20 17.9319 20 18.3978 19.8478 18.7654C19.6448 19.2554 19.2554 19.6448 18.7654 19.8478C18.3978 20 17.9319 20 17 20C16.0681 20 15.6022 20 15.2346 19.8478C14.7446 19.6448 14.3552 19.2554 14.1522 18.7654C14 18.3978 14 17.9319 14 17Z" fill={color}/>
      </Svg>
    );
  } else {
    // Unselected state SVG (outlined squares)
    return (
      <Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
        <Path fillRule="evenodd" clipRule="evenodd" d="M8.14537 3.27077C7.84076 3.24999 7.46972 3.24999 7.02527 3.25H6.97475C6.53029 3.24999 6.15925 3.24999 5.85464 3.27077C5.53754 3.29241 5.23801 3.33905 4.94762 3.45933C4.27379 3.73844 3.73844 4.27379 3.45933 4.94762C3.33905 5.23801 3.29241 5.53754 3.27077 5.85464C3.24999 6.15925 3.24999 6.53028 3.25 6.97474V7.02525C3.24999 7.46971 3.24999 7.84076 3.27077 8.14537C3.29241 8.46247 3.33905 8.76199 3.45933 9.05238C3.73844 9.72621 4.27379 10.2616 4.94762 10.5407C5.23801 10.661 5.53754 10.7076 5.85464 10.7292C6.15925 10.75 6.53028 10.75 6.97474 10.75H7.02526C7.46972 10.75 7.84075 10.75 8.14537 10.7292C8.46247 10.7076 8.76199 10.661 9.05238 10.5407C9.72621 10.2616 10.2616 9.72621 10.5407 9.05238C10.661 8.76199 10.7076 8.46247 10.7292 8.14537C10.75 7.84075 10.75 7.46972 10.75 7.02526V6.97474C10.75 6.53028 10.75 6.15925 10.7292 5.85464C10.7076 5.53754 10.661 5.23801 10.5407 4.94762C10.2616 4.27379 9.72621 3.73844 9.05238 3.45933C8.76199 3.33905 8.46247 3.29241 8.14537 3.27077ZM5.52165 4.84515C5.5988 4.81319 5.71602 4.78372 5.95674 4.76729C6.20421 4.75041 6.5238 4.75 7 4.75C7.4762 4.75 7.7958 4.75041 8.04326 4.76729C8.28399 4.78372 8.4012 4.81319 8.47836 4.84515C8.78464 4.97202 9.02798 5.21536 9.15485 5.52165C9.18681 5.5988 9.21629 5.71602 9.23271 5.95674C9.24959 6.20421 9.25 6.5238 9.25 7C9.25 7.4762 9.24959 7.7958 9.23271 8.04326C9.21629 8.28399 9.18681 8.4012 9.15485 8.47836C9.02798 8.78464 8.78464 9.02798 8.47836 9.15485C8.4012 9.18681 8.28399 9.21629 8.04326 9.23271C7.7958 9.24959 7.4762 9.25 7 9.25C6.5238 9.25 6.20421 9.24959 5.95674 9.23271C5.71602 9.21629 5.5988 9.18681 5.52165 9.15485C5.21536 9.02798 4.97202 8.78464 4.84515 8.47836C4.81319 8.4012 4.78372 8.28399 4.76729 8.04326C4.75041 7.7958 4.75 7.4762 4.75 7C4.75 6.5238 4.75041 6.20421 4.76729 5.95674C4.78372 5.71602 4.81319 5.5988 4.84515 5.52165C4.97202 5.21536 5.21536 4.97202 5.52165 4.84515Z" fill={color}/>
        <Path fillRule="evenodd" clipRule="evenodd" d="M18.1454 3.27077C17.8408 3.24999 17.4697 3.24999 17.0253 3.25H16.9748C16.5303 3.24999 16.1592 3.24999 15.8546 3.27077C15.5375 3.29241 15.238 3.33905 14.9476 3.45933C14.2738 3.73844 13.7384 4.27379 13.4593 4.94762C13.339 5.23801 13.2924 5.53754 13.2708 5.85464C13.25 6.15925 13.25 6.53028 13.25 6.97474V7.02526C13.25 7.46972 13.25 7.84075 13.2708 8.14537C13.2924 8.46247 13.339 8.76199 13.4593 9.05238C13.7384 9.72621 14.2738 10.2616 14.9476 10.5407C15.238 10.661 15.5375 10.7076 15.8546 10.7292C16.1592 10.75 16.5303 10.75 16.9747 10.75H17.0253C17.4697 10.75 17.8408 10.75 18.1454 10.7292C18.4625 10.7076 18.762 10.661 19.0524 10.5407C19.7262 10.2616 20.2616 9.72621 20.5407 9.05238C20.661 8.76199 20.7076 8.46247 20.7292 8.14537C20.75 7.84075 20.75 7.46972 20.75 7.02526V6.97474C20.75 6.53028 20.75 6.15925 20.7292 5.85464C20.7076 5.53754 20.661 5.23801 20.5407 4.94762C20.2616 4.27379 19.7262 3.73844 19.0524 3.45933C18.762 3.33905 18.4625 3.29241 18.1454 3.27077ZM15.5216 4.84515C15.5988 4.81319 15.716 4.78372 15.9567 4.76729C16.2042 4.75041 16.5238 4.75 17 4.75C17.4762 4.75 17.7958 4.75041 18.0433 4.76729C18.284 4.78372 18.4012 4.81319 18.4784 4.84515C18.7846 4.97202 19.028 5.21536 19.1549 5.52165C19.1868 5.5988 19.2163 5.716 19.2327 5.95674C19.2496 6.20421 19.25 6.5238 19.25 7C19.25 7.4762 19.2496 7.7958 19.2327 8.04326C19.2163 8.28399 19.1868 8.4012 19.1549 8.47836C19.028 8.78464 18.7846 9.02798 18.4784 9.15485C18.4012 9.18681 18.284 9.21629 18.0433 9.23271C17.7958 9.24959 17.4762 9.25 17 9.25C16.5238 9.25 16.2042 9.24959 15.9567 9.23271C15.716 9.21629 15.5988 9.18681 15.5216 9.15485C15.2154 9.02798 14.972 8.78464 14.8452 8.47836C14.8132 8.4012 14.7837 8.284 14.7673 8.04326C14.7504 7.7958 14.75 7.4762 14.75 7C14.75 6.5238 14.7504 6.20421 14.7673 5.95674C14.7837 5.716 14.8132 5.5988 14.8452 5.52165C14.972 5.21536 15.2154 4.97202 15.5216 4.84515Z" fill={color}/>
        <Path fillRule="evenodd" clipRule="evenodd" d="M8.14537 13.2708C7.84075 13.25 7.46972 13.25 7.02526 13.25H6.97474C6.53028 13.25 6.15925 13.25 5.85464 13.2708C5.53754 13.2924 5.23801 13.339 4.94762 13.4593C4.27379 13.7384 3.73844 14.2738 3.45933 14.9476C3.33905 15.238 3.29241 15.5375 3.27077 15.8546C3.24999 16.1592 3.24999 16.5303 3.25 16.9747V17.0253C3.24999 17.4697 3.24999 17.8408 3.27077 18.1454C3.29241 18.4625 3.33905 18.762 3.45933 19.0524C3.73844 19.7262 4.27379 20.2616 4.94762 20.5407C5.23801 20.661 5.53754 20.7076 5.85464 20.7292C6.15925 20.75 6.53028 20.75 6.97474 20.75H7.02526C7.46972 20.75 7.84075 20.75 8.14537 20.7292C8.46247 20.7076 8.76199 20.661 9.05238 20.5407C9.72621 20.2616 10.2616 19.7262 10.5407 19.0524C10.661 18.762 10.7076 18.4625 10.7292 18.1454C10.75 17.8408 10.75 17.4697 10.75 17.0253V16.9747C10.75 16.5303 10.75 16.1592 10.7292 15.8546C10.7076 15.5375 10.661 15.238 10.5407 14.9476C10.2616 14.2738 9.72621 13.7384 9.05238 13.4593C8.76199 13.339 8.46247 13.2924 8.14537 13.2708ZM5.52165 14.8452C5.5988 14.8132 5.71602 14.7837 5.95674 14.7673C6.20421 14.7504 6.5238 14.75 7 14.75C7.4762 14.75 7.7958 14.7504 8.04326 14.7673C8.28399 14.7837 8.4012 14.8132 8.47836 14.8452C8.78464 14.972 9.02798 15.2154 9.15485 15.5216C9.18681 15.5988 9.21629 15.716 9.23271 15.9567C9.24959 16.2042 9.25 16.5238 9.25 17C9.25 17.4762 9.24959 17.7958 9.23271 18.0433C9.21629 18.284 9.18681 18.4012 9.15485 18.4784C9.02798 18.7846 8.78464 19.028 8.47836 19.1549C8.4012 19.1868 8.28399 19.2163 8.04326 19.2327C7.7958 19.2496 7.4762 19.25 7 19.25C6.5238 19.25 6.20421 19.2496 5.95674 19.2327C5.71602 19.2163 5.5988 19.1868 5.52165 19.1549C5.21536 19.028 4.97202 18.7846 4.84515 18.4784C4.81319 18.4012 4.78372 18.284 4.76729 18.0433C4.75041 17.7958 4.75 17.4762 4.75 17C4.75 16.5238 4.75041 16.20421 4.76729 15.9567C4.78372 15.716 4.81319 15.5988 4.84515 15.5216C4.97202 15.2154 5.21536 14.972 5.52165 14.8452Z" fill={color}/>
        <Path fillRule="evenodd" clipRule="evenodd" d="M18.1454 13.2708C17.8408 13.25 17.4697 13.25 17.0253 13.25H16.9747C16.5303 13.25 16.1592 13.25 15.8546 13.2708C15.5375 13.2924 15.238 13.339 14.9476 13.4593C14.2738 13.7384 13.7384 14.2738 13.4593 14.9476C13.339 15.238 13.2924 15.5375 13.2708 15.8546C13.25 16.1592 13.25 16.5303 13.25 16.9747V17.0253C13.25 17.4697 13.25 17.8408 13.2708 18.1454C13.2924 18.4625 13.339 18.762 13.4593 19.0524C13.7384 19.7262 14.2738 20.2616 14.9476 20.5407C15.238 20.661 15.5375 20.7076 15.8546 20.7292C16.1592 20.75 16.5303 20.75 16.9747 20.75H17.0253C17.4697 20.75 17.8408 20.75 18.1454 20.7292C18.4625 20.7076 18.762 20.661 19.0524 20.5407C19.7262 20.2616 20.2616 19.7262 20.5407 19.0524C20.661 18.762 20.7076 18.4625 20.7292 18.1454C20.75 17.8408 20.75 17.4697 20.75 17.0253V16.9747C20.75 16.5303 20.75 16.1592 20.7292 15.8546C20.7076 15.5375 20.661 15.238 20.5407 14.9476C20.2616 14.2738 19.7262 13.7384 19.0524 13.4593C18.762 13.339 18.4625 13.2924 18.1454 13.2708ZM15.5216 14.8452C15.5988 14.8132 15.716 14.7837 15.9567 14.7673C16.2042 14.7504 16.5238 14.75 17 14.75C17.4762 14.75 17.7958 14.7504 18.0433 14.7673C18.284 14.7837 18.4012 14.8132 18.4784 14.8452C18.7846 14.972 19.028 15.2154 19.1549 15.5216C19.1868 15.5988 19.2163 15.716 19.2327 15.9567C19.2496 16.2042 19.25 16.5238 19.25 17C19.25 17.4762 19.2496 17.7958 19.2327 18.0433C19.2163 18.284 19.1868 18.4012 19.1549 18.4784C19.028 18.7846 18.7846 19.028 18.4784 19.1549C18.4012 19.1868 18.284 19.2163 18.0433 19.2327C17.7958 19.2496 17.4762 19.25 17 19.25C16.5238 19.25 16.2042 19.2496 15.9567 19.2327C15.716 19.2163 15.5988 19.1868 15.5216 19.1549C15.2154 19.028 14.972 18.7846 14.8452 18.4784C14.8132 18.4012 14.7837 18.284 14.7673 18.0433C14.7504 17.7958 14.75 17.4762 14.75 17C14.75 16.5238 14.7504 16.20421 14.7673 15.9567C14.7837 15.716 14.8132 15.5988 14.8452 15.5216C14.972 15.2154 15.2154 14.972 15.5216 14.8452Z" fill={color}/>
      </Svg>
    );
  }
};

export default StoresIcon;