import { Link } from 'react-router-dom'

export default function Breadcrumb({ title, items = [] }) {
  return (
    <div className="breadcumb-banner">
      <div className="breadcumb-wrapper" id="breadcumbwrap">
        <div className="container">
          <div className="breadcumb-content">
            <h1 className="breadcumb-title">{title}</h1>
            <ul className="breadcumb-menu">
              {items.map((item, i) => (
                <li key={i}>
                  {item.link ? <Link to={item.link}>{item.label}</Link> : item.label}
                </li>
              ))}
            </ul>
          </div>
        </div>
      </div>
    </div>
  )
}
